Created
March 12, 2011 14:29
-
-
Save lukeledet/867274 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 'spork' | |
Spork.prefork do | |
ENV["RAILS_ENV"] ||= "test" | |
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
require 'cucumber/rails' | |
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support | |
Capybara.default_selector = :css | |
ActionController::Base.allow_rescue = false | |
Cucumber::Rails::World.use_transactional_fixtures = true | |
if defined?(ActiveRecord::Base) | |
begin | |
require 'database_cleaner' | |
DatabaseCleaner.strategy = :truncation | |
rescue LoadError => ignore_if_database_cleaner_not_present | |
end | |
end | |
end | |
Spork.each_run do | |
# This code will be run each time you run your specs. | |
load "#{Rails.root}/config/routes.rb" | |
load "#{Rails.root}/features/support/paths.rb" | |
Dir["#{Rails.root}/app/**/*.rb"].each { |f| load f } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment