我正在尝试使用simplecov来监控我的测试覆盖率,然而,在不得不回滚对我的项目的一些更改并重新安装simplecov之后,它似乎已经崩溃了。
它不再跟踪模型和控制器等,而是涵盖规范文件,如下所示:

我如何才能让它回到在单独的选项卡中跟踪实际的rails文件的位置呢?
任何帮助都是最好的!
发布于 2016-09-09 22:14:42
我猜你有一个初始化器,或者你要配置SimpleCov的什么东西,你需要像这样定义组:
SimpleCov.start do
add_group "Models", "app/models"
add_group "Controllers", "app/controllers"
add_group "Long files" do |src_file|
src_file.lines.count > 100
end
add_group "Multiple Files", ["app/models", "app/controllers"] # You can also pass in an array
add_group "Short files", LineFilter.new(5) # Using the LineFilter class defined in Filters section above
end发布于 2018-08-29 19:21:56
将这些行添加到spec_helper.rb的最上面
require "simplecov"
SimpleCov.start "rails"
# Previous content of test helper now starts herehttps://stackoverflow.com/questions/39412458
复制相似问题