-
-
Save alekpopovic/9473567f26a18b0fbb54 to your computer and use it in GitHub Desktop.
Rake Task for generating a RSpec report in html.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec/core/rake_task' | |
RSpec::Core::RakeTask.new(:spec) do |t| | |
t.rspec_opts = '--format html --out reports/rspec_results.html' | |
end | |
namespace :rspec_report do | |
desc 'Run all specs and generate RSpec report in HTML' | |
task :html => :spec | |
desc 'Run all specs, generate RSpec report and open it in the browser' | |
task :browser do | |
Rake::Task[:spec].invoke | |
`open reports/rspec_results.html` # This only works if running OS X. | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment