From 6f218901daadfe428113abe3c33d601778926c0e Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Mon, 8 Mar 2010 20:36:55 +0100 Subject: [PATCH] add rake task to run selenium cucumber features with rake cucumber:selenium rake cucumber runs all non-selenium stories rake cucumber:selenium runs all selenium stories --- lib/tasks/cucumber.rake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/tasks/cucumber.rake b/lib/tasks/cucumber.rake index ed03801a..1a04fc73 100644 --- a/lib/tasks/cucumber.rake +++ b/lib/tasks/cucumber.rake @@ -26,6 +26,13 @@ unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems: t.profile = 'wip' end + Cucumber::Rake::Task.new({:selenium => 'db:test:prepare'}, 'Run features that require selenium') do |t| + t.binary = vendored_cucumber_bin + t.fork = true # You may get faster startup if you set this to false + t.profile = 'selenium' + ENV['RAILS_ENV'] = "selenium" # switch to selenium environment + end + desc 'Run all features' task :all => [:ok, :wip] end