Skip to content

Instantly share code, notes, and snippets.

@zhengjia
Created May 27, 2010 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhengjia/415355 to your computer and use it in GitHub Desktop.
Save zhengjia/415355 to your computer and use it in GitHub Desktop.
env.rb for selenium
ENV["RAILS_ENV"] ||= "cucumber"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/formatter/unicode'
require 'cucumber/rails/rspec'
require 'cucumber/rails/world'
require 'cucumber/rails/active_record'
require 'cucumber/web/tableish'
require 'webrat'
require 'webrat/core/matchers'
Webrat.configure do |config|
config.mode = :selenium # was rails
config.open_error_files = false
end
ActionController::Base.allow_rescue = false
Cucumber::Rails::World.use_transactional_fixtures = false
require 'database_cleaner'
DatabaseCleaner.strategy = :truncation
class ActiveSupport::TestCase
setup do |session|
session.host! "localhost:3001"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment