Permalink
Browse files

update generator in cucumber task. Needed with cucumber > 0.3.4. Not …

…less
  • Loading branch information...
1 parent 4eb0e14 commit 317d64d45204c01a6ccbadfe1bd95e5ad06f7012 @shingara shingara committed May 24, 2009
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/generators/cucumber/templates/lib/tasks/cucumber.rake
@@ -3,6 +3,16 @@ require 'cucumber/rake/task'
cucumber_options = lambda do |t|
# if you want to pass some custom options to cucumber, pass them here
t.binary = Merb.root / 'bin' / 'cucumber' if File.exist?(Merb.root / 'bin' / 'cucumber')
+ # We need use fork cucumber since cucumber > 0.3.4
+ t.fork = true
+
+ # Add all requirement like before cucumber<0.3.4
+ t.cucumber_opts = ''
+ require_list = Array(FileList[File.join(File.dirname(__FILE__),"../../features/**/*.rb")])
+ require_list.each do |step_file|
+ t.cucumber_opts << '--require'
+ t.cucumber_opts << step_file
+ end
end
Cucumber::Rake::Task.new(:features, &cucumber_options)

0 comments on commit 317d64d

Please sign in to comment.