Created
December 11, 2008 02:35
-
-
Save moro/34584 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Sets up the Rails environment for Cucumber | |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
require 'cucumber/rails/world' | |
Cucumber::Rails.use_transactional_fixtures | |
# Comment out the next line if you're not using RSpec's matchers (should / should_not) in your steps. | |
require 'cucumber/rails/rspec' | |
ActionController::Base.class_eval do | |
def perform_action | |
begin | |
perform_action_without_rescue | |
rescue Exception => exception | |
if handler_for_rescue(exception) | |
rescue_action_with_handler(exception) | |
else | |
raise exception | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment