Permalink
Browse files

Only run rcov and heckle with ruby 1.8 when running rspec's own specs

  • Loading branch information...
1 parent 925274c commit 43a3e89ead7bf1f5be955306da9a423dda96c677 @dchelimsky dchelimsky committed Mar 15, 2009
Showing with 11 additions and 4 deletions.
  1. +9 −3 Rakefile
  2. +2 −1 cucumber.yml
View
@@ -34,7 +34,11 @@ load File.dirname(__FILE__) + '/resources/rake/examples_with_rcov.rake'
load File.dirname(__FILE__) + '/resources/rake/failing_examples_with_html.rake'
load File.dirname(__FILE__) + '/resources/rake/verify_rcov.rake'
-task :default => [:verify_rcov, :features]
+if RUBY_VERSION =~ /^1.8/
+ task :default => [:verify_rcov, :features]
+else
+ task :default => [:spec, :features]
+end
namespace :spec do
desc "Run all specs with rcov"
@@ -43,12 +47,14 @@ namespace :spec do
t.spec_opts = ['--options', 'spec/spec.opts']
t.rcov = true
t.rcov_dir = 'coverage'
- t.rcov_opts = ['--exclude', "lib/spec.rb,lib/spec/runner.rb,spec\/spec,bin\/spec,examples,\/gems,\/Library\/Ruby,\.autotest,#{ENV['GEM_HOME']}"]
+ t.rcov_opts = ['--exclude', "instance_exec\.rb,lib/spec.rb,lib/spec/runner.rb,spec/spec,bin/spec,examples,/gems,/Library/Ruby,\.autotest,#{ENV['GEM_HOME']}"]
end
end
desc "Run Cucumber features"
-Cucumber::Rake::Task.new do; end
+task :features do
+ sh(RUBY_VERSION =~ /^1.8/ ? "cucumber" : "cucumber --profile no_heckle")
+end
desc "Run failing examples (see failure output)"
Spec::Rake::SpecTask.new('failing_examples') do |t|
View
@@ -1,2 +1,3 @@
default: --require features features
-pending: --require features features-pending
+pending: --require features features-pending
+no_heckle: --require features features --exclude heckle

0 comments on commit 43a3e89

Please sign in to comment.