testdouble/cypress-rails

Is there a way to have simplecov measuring coverage ?

Closed this issue · 2 comments

I'm still working on how to integrate simplecov to the tool. If I find the way, I'll write it here.

Ok nothing fancy. Just install the simplecov gem.

Then add an initializer, for example config/initializers/simplecov.rb

if ENV['COVERAGE_PLEASE'] == 'true'
  require 'simplecov'
  SimpleCov.start 'rails' do
    coverage_dir "coverage/ruby/functional".to_s
  end
  puts "required simplecov for functional testing"
end

Then

bundle exec rails cypress:run COVERAGE_PLEASE=true

yup! I wold have suggested something similar.