Permalink
Browse files

a little bit rakefile fix

  • Loading branch information...
1 parent 921b7d5 commit b673f5bb0f226f6090218983f7a1e5892914f436 @kucaahbe kucaahbe committed Nov 4, 2011
Showing with 16 additions and 5 deletions.
  1. +16 −5 Rakefile
View
21 Rakefile
@@ -3,14 +3,25 @@ require 'cucumber'
require 'cucumber/rake/task'
Bundler::GemHelper.install_tasks
-profiles = %w(rack_test_test_unit selenium_test_unit)
+drivers = %w(rack_test selenium)
+test_unit_framework = case RUBY_VERSION
+ when '1.8.7'
+ 'test_unit'
+ when '1.9.2'
+ 'minitest'
+ end
+test_frameworks=%W(rspec #{test_unit_framework})
-task :default => profiles.map { |p| "examples:#{p}" }
+task :default => drivers.map { |d| test_frameworks.map { |tf| "examples:#{d}:#{tf}" } }.flatten
namespace :examples do
- profiles.each do |profile|
- Cucumber::Rake::Task.new(profile) do |t|
- t.profile=profile
+ drivers.each do |driver|
+ namespace driver do
+ test_frameworks.each do |test_framework|
+ Cucumber::Rake::Task.new(test_framework,"run features using #{driver} and #{test_framework}") do |t|
+ t.profile="#{driver}_#{test_framework}"
+ end
+ end
end
end
end

0 comments on commit b673f5b

Please sign in to comment.