Skip to content

Instantly share code, notes, and snippets.



Forked from bmabey/env.rb
Created Aug 8, 2009
What would you like to do?
require 'rubygems'
require 'spork'
Spork.prefork do
# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] ||= "cucumber"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'webrat'
Webrat.configure do |config|
config.mode = :rails
require 'webrat/core/matchers'
require 'cucumber' # I needed to add this... We could move this require to Spork if we think it is better there...
require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
require 'spec/rails' # I needed to add this as well to avoid the #records error...
require 'cucumber/rails/rspec'
Spork.each_run do
# This code will be run each time you run your specs.
require 'cucumber/rails/world'
Cucumber::Rails.bypass_rescue # Comment out this line if you want Rails own error handling
# (e.g. rescue_action_in_public / rescue_responses / rescue_from)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment