Rakefile in earth-0.5.0 vs Rakefile in earth-0.5.2

- old
+ new

@@ -22,15 +22,17 @@ else t.cucumber_opts = 'features --format pretty' end end -desc "Run cucumber tests with RCov" -Cucumber::Rake::Task.new(:features_with_coverage) do |t| - t.cucumber_opts = "features --format pretty" - t.rcov = true - t.rcov_opts = ['--exclude', 'features'] +if RUBY_VERSION =~ /^1\.8/ + desc "Run cucumber tests with RCov" + Cucumber::Rake::Task.new(:features_with_coverage) do |t| + t.cucumber_opts = "features --format pretty" + t.rcov = true + t.rcov_opts = ['--exclude', 'features'] + end end require 'rspec/core/rake_task' desc "Run all examples" RSpec::Core::RakeTask.new(:examples) do |c| @@ -39,14 +41,16 @@ else c.rspec_opts = '-Ispec' end end -desc "Run specs with RCov" -RSpec::Core::RakeTask.new(:examples_with_coverage) do |t| - t.rcov = true - t.rcov_opts = ['--exclude', 'spec'] - t.rspec_opts = '-Ispec' +if RUBY_VERSION =~ /^1\.8/ + desc "Run specs with RCov" + RSpec::Core::RakeTask.new(:examples_with_coverage) do |t| + t.rcov = true + t.rcov_opts = ['--exclude', 'spec'] + t.rspec_opts = '-Ispec' + end end task :test => [:features, :examples] task :default => :test