require 'rubygems' require 'spork' # Sets up the Rails environment for Cucumber Spork.prefork do ENV["RAILS_ENV"] ||= "test" require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') end Spork.each_run do require 'cucumber/world' require 'cucumber/rails/world' require File.expand_path(File.dirname(__FILE__) + '/patched_world') require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support Cucumber::Rails.use_transactional_fixtures #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) $KCODE='u' # for UTF-8 ??? => DOES NOT WORK!!! Warning: $KCODE is NONE. require 'webrat' Webrat.configure do |config| config.mode = :rails config.open_error_files = true # if you are annoyed by firefox opening too many files, change it to "false" end require 'cucumber/rails/rspec' require 'webrat/core/matchers' require 'machinist' require File.expand_path(File.dirname(__FILE__) + "/../../spec/test_data_builder") include TestDataBuilder # prevent error Mysql::Error: MySQL server has gone away ActiveRecord::Base.establish_connection # make sure that the db connection is ready. end