rcov

RCov with RSpec-2

喜夏-厌秋 提交于 2019-12-21 04:34:35
问题 I'm working with a bit of a bleeding edge rails app. Rails 3, RSpec 2, Rspec-Rails2. It seems as if RSpec2 doesn't include the spec:rcov rake task that RSpec 1 has. (at least it isn't there yet) Has anyone had any luck running rcov with rspec 2, or writing their own rake task to make this work? 回答1: Try passing in options to exclude the gem directory. Or since your running rails use the rails flag: desc "Run all specs with rcov" RSpec::Core::RakeTask.new(:rcov => spec_prereq) do |t| t.rcov =

Rails + Capybara-webkit – javascript code coverage?

爷,独闯天下 提交于 2019-12-09 06:44:59
问题 I am looking into using capybara-webkit to do somewhat close-to-reality tests of app. This is absolutely neccessary as the app features a very rich JS-based UI and the Rails part is mostly API calls. The question is: is there any tools to integrate into testing pipeline which could instrument Javascript code and report its coverage? The key here is the ability to integrate into testing workflow (just like rcov/simplecov) easily – I don't like the idea do it myself with jscoverage or analogue

RCov with RSpec-2

﹥>﹥吖頭↗ 提交于 2019-12-03 13:13:17
I'm working with a bit of a bleeding edge rails app. Rails 3, RSpec 2, Rspec-Rails2. It seems as if RSpec2 doesn't include the spec:rcov rake task that RSpec 1 has. (at least it isn't there yet) Has anyone had any luck running rcov with rspec 2, or writing their own rake task to make this work? Try passing in options to exclude the gem directory. Or since your running rails use the rails flag: desc "Run all specs with rcov" RSpec::Core::RakeTask.new(:rcov => spec_prereq) do |t| t.rcov = true t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/} end If you happen to be on Ruby