Skip to content

Instantly share code, notes, and snippets.

@rjharmon
Created February 15, 2009 22:14
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 rjharmon/64875 to your computer and use it in GitHub Desktop.
Save rjharmon/64875 to your computer and use it in GitHub Desktop.
# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/rails/world'
require 'cucumber/formatters/unicode' # Comment out this line if you don't want Cucumber Unicode support
Cucumber::Rails.use_transactional_fixtures
require 'webrat'
require "webrat/rails"
Webrat.configure do |config|
config.mode = :rails
end
# Comment out the next two lines if you're not using RSpec's matchers (should / should_not) in your steps.
require 'cucumber/rails/rspec'
require 'webrat/rspec-rails'
World do
Cucumber::Rails::World.new
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment