Setup code coverage with simplecov

This commit is contained in:
Wilson Silva
2023-01-06 11:09:13 +07:00
parent 80b07ccf4c
commit 89a23a69e2
3 changed files with 23 additions and 0 deletions

View File

@@ -10,3 +10,13 @@ RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new
task default: %i[spec rubocop]
# Delete these files and folders when running rake clobber.
CLOBBER.include('coverage', '.rspec_status')
desc 'Run spec with coverage'
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task['spec'].execute
`open coverage/index.html`
end