lib/sniff/rake_tasks.rb in sniff-0.6.3 vs lib/sniff/rake_tasks.rb in sniff-0.6.4
- old
+ new
@@ -118,10 +118,14 @@
if rspec
require 'rspec/core/rake_task'
desc "Run all examples"
RSpec::Core::RakeTask.new('examples') do |c|
- c.rspec_opts = '-Ispec'
+ if ENV['RSPEC_FORMAT']
+ c.rspec_opts = "-Ispec --format #{ENV['RSPEC_FORMAT']}"
+ else
+ c.rspec_opts = '-Ispec --format documentation'
+ end
end
if rcov
desc "Run specs with RCov"
RSpec::Core::RakeTask.new(:examples_with_coverage) do |t|