Check coverage status using simplecov in Rails

Check coverage status using simplecov in Rails

Well, so you need to add the following gem to you Gemfile if you are using cucumber you can also add the cucumber gem:


group :test do
gem 'cucumber-rails', require: false
gem 'simplecov', require: false
end

And after run all your test suite you can see the coverage status doing the following inside your project directory:

# for your unit tests(rspec, minitest)
cd coverage
open index.html

# for your cucubmer test
cd coverage.features
open index.html

That’s it now you can see the status of your test suite and if you are testing all the scenario or if you have many not tested scenarios, keep in touch.

H.

No Comments

Post A Comment