Skip to content

Instantly share code, notes, and snippets.

@unixmonkey
Created June 29, 2010 14:11
Show Gist options
  • Save unixmonkey/457259 to your computer and use it in GitHub Desktop.
Save unixmonkey/457259 to your computer and use it in GitHub Desktop.
desc 'Set RAILS_ENV to cucumber, run cucumber and re-set RAILS ENV'
task :cuke do
# save old env
old_env = RAILS_ENV || ENV['RAILS_ENV'] || 'test'
# set to cucumber env
RAILS_ENV = ENV['RAILS_ENV'] = 'cucumber'
# run cucumber
Rake::Task['cucumber'].invoke
# back to normal env
RAILS_ENV = ENV['RAILS_ENV'] = old_env
end
task :build => ['db:test:load', 'cuke', 'test', 'metrics:all']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment