Created
November 23, 2011 14:34
-
-
Save kbredemeier/1388814 to your computer and use it in GitHub Desktop.
Cucumber enviroment
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 'rubygems' | |
require 'spork' | |
Spork.prefork do | |
require 'cucumber/rails' | |
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
require 'rspec/rails' | |
require 'capybara/rails' | |
Capybara.default_selector = :css | |
Capybara.default_driver = :webkit | |
end | |
Spork.each_run do | |
begin | |
DatabaseCleaner.strategy = :transaction | |
rescue NameError | |
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it." | |
end | |
Cucumber::Rails::Database.javascript_strategy = :truncation | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment