Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cassiomarques/73778 to your computer and use it in GitHub Desktop.
Save cassiomarques/73778 to your computer and use it in GitHub Desktop.
require 'cucumber/rake/task'
namespace :cucumber do
Cucumber::Rake::Task.new(:plain) do |t|
t.cucumber_opts = "--format pretty"
t.step_list = %w{features/support/env.rb features/support/plain.rb features/step_definitions}
t.feature_list = %w{features/plain}
end
task :plain => 'db:test:prepare'
Cucumber::Rake::Task.new(:selenium, "Run features with Cucumber+Selenium from features/selenium, inside browsers") do |t|
t.cucumber_opts = "--format pretty"
t.step_list = %w{features/support/env.rb features/support/selenium.rb features/step_definitions}
t.feature_list = %w{features/selenium}
end
task :selenium => 'db:test:prepare'
end
desc "shortcut for cucumber:plain"
task :features => 'cucumber:plain'
# features/support/env.rb is default from cucumber
Job.destroy_all
Local.destroy_all
Cucumber::Rails.use_transactional_fixtures
Webrat.configure do |config|
config.mode = :rails
end
Webrat.configure do |config|
config.mode = :selenium
# Selenium defaults to using the selenium environment. Use the following to override this.
config.application_environment = :test
end
Before do
Job.destroy_all
Local.destroy_all
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment