webrat/spec/integration/rails/test/test_helper.rb

26 lines
555 B
Ruby
Raw Normal View History

ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
# begin
# require "redgreen"
# rescue MissingSourceFile
# end
require File.dirname(__FILE__) + "/../../../../lib/webrat"
2008-12-29 06:30:26 +00:00
Webrat.configure do |config|
config.mode = ENV['WEBRAT_INTEGRATION_MODE'].to_sym
2008-12-29 06:30:26 +00:00
end
2008-12-29 06:30:26 +00:00
ActionController::Base.class_eval do
def perform_action
perform_action_without_rescue
end
end
2008-12-29 06:30:26 +00:00
Dispatcher.class_eval do
def self.failsafe_response(output, status, exception = nil)
raise exception
end
2009-04-08 00:30:12 +00:00
end