Sunday 15 September 2013

ruby - Making Spring gem work with SimpleCov -


I use spring gem to speed up my rspec I am doing and cucumber test.
Both of my spec / spec_helper.rb and features / support / env.rb files have the following configurations: rspec spec / And start with my code with , then 'simplecov' requires simplecov.start 'rails'

rack cucumber: OK, merge with Report of SimpleCov And I get what I wanted.
But if I use spring rspec spec / and spring cucumber facilities / , each order overwrits the previous report and does not merge them.
How can I do a spring merge report?

You must provide a name for each report, so that simplekov knows that they merge has gone. Simplecov tries to find the command but the spring command makes it impossible, so do it manually.

then in spec / spec_helper.rb :

  SimpleCov.command_name "RSpec"   

and Remember to stop the spring server in features / support / env.rb :

  SimpleCov.command_name "cucumber"   

Change will take effect:

  Spring Stop   



No comments:

Post a Comment