-
-
Save cassiomarques/73778 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Job.destroy_all | |
Local.destroy_all | |
Cucumber::Rails.use_transactional_fixtures | |
Webrat.configure do |config| | |
config.mode = :rails | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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