Permalink
Browse files

dev: exclude rcov for ruby 1.9

  • Loading branch information...
1 parent c0a318a commit 5ee3840a81196e162ffea76c071dc731bf5a4a9b @dchelimsky dchelimsky committed Jun 21, 2011
Showing with 17 additions and 19 deletions.
  1. +17 −19 Rakefile
View
@@ -9,16 +9,6 @@ require 'rspec/expectations/version'
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:cucumber)
-namespace :cucumber do
- desc "Run cucumber features using rcov"
- Cucumber::Rake::Task.new :rcov => :cleanup_rcov_files do |t|
- t.cucumber_opts = %w{--format progress}
- t.rcov = true
- t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
- t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
- end
-end
-
task :cleanup_rcov_files do
rm_rf 'coverage.data'
end
@@ -28,18 +18,24 @@ RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w[--color]
end
-
-namespace :spec do
- desc "Run all examples using rcov"
- RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
- t.rcov = true
- t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
- t.rcov_opts << %[--text-report --sort coverage --no-html --aggregate coverage.data]
+if RUBY_VERSION.to_f == 1.8
+ namespace :rcov do
+ desc "Run all examples using rcov"
+ RSpec::Core::RakeTask.new :spec => :cleanup_rcov_files do |t|
+ t.rcov = true
+ t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
+ t.rcov_opts << %[--text-report --sort coverage --no-html --aggregate coverage.data]
+ end
+ desc "Run cucumber features using rcov"
+ Cucumber::Rake::Task.new :cucumber => :cleanup_rcov_files do |t|
+ t.cucumber_opts = %w{--format progress}
+ t.rcov = true
+ t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
+ t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
+ end
end
end
-task :default => [:spec, :cucumber]
-
desc "Push docs/cukes to relishapp using the relish-client-gem"
task :relish, :version do |t, args|
raise "rake relish[VERSION]" unless args[:version]
@@ -62,3 +58,5 @@ task :clobber => ["clobber:rbc"] do
rm_rf 'tmp'
rm_rf 'coverage'
end
+
+task :default => [:spec, :cucumber]

0 comments on commit 5ee3840

Please sign in to comment.