Skip to content

Commit

Permalink
enable rcov task on ruby 1.8 only
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Apr 1, 2013
1 parent 0fec2a2 commit 1fd1ace
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/rspec/rails/tasks/rspec.rake
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ namespace :spec do
end
end

desc "Run all specs with rcov"
RSpec::Core::RakeTask.new(:rcov => spec_prereq) do |t|
t.rcov = true
t.pattern = "./spec/**/*_spec.rb"
t.rcov_opts = '--exclude /gems/,/Library/,/usr/,lib/tasks,.bundle,config,/lib/rspec/,/lib/rspec-,spec'
# RCov task only enabled for Ruby 1.8
if RUBY_VERSION < '1.9'
desc "Run all specs with rcov"
RSpec::Core::RakeTask.new(:rcov => spec_prereq) do |t|
t.rcov = true
t.pattern = "./spec/**/*_spec.rb"
t.rcov_opts = '--exclude /gems/,/Library/,/usr/,lib/tasks,.bundle,config,/lib/rspec/,/lib/rspec-,spec'
end
end

task :statsetup do
Expand All @@ -42,4 +45,3 @@ namespace :spec do
end
end
end

0 comments on commit 1fd1ace

Please sign in to comment.