Setup code coverage with simplecov
This commit is contained in:
10
Rakefile
10
Rakefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user