2008-12-29 06:11:41 +00:00
|
|
|
ENV["RAILS_ENV"] = "test"
|
|
|
|
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
|
|
|
require 'test_help'
|
|
|
|
|
2009-06-15 04:16:23 +00:00
|
|
|
# begin
|
|
|
|
# require "redgreen"
|
|
|
|
# rescue MissingSourceFile
|
|
|
|
# end
|
2009-01-26 00:48:02 +00:00
|
|
|
|
2009-08-13 00:39:35 +00:00
|
|
|
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../../../../lib"
|
|
|
|
require "webrat"
|
2008-12-29 06:11:41 +00:00
|
|
|
|
2008-12-29 06:30:26 +00:00
|
|
|
Webrat.configure do |config|
|
2009-01-13 13:57:20 +00:00
|
|
|
config.mode = ENV['WEBRAT_INTEGRATION_MODE'].to_sym
|
2008-12-29 06:30:26 +00:00
|
|
|
end
|
2008-12-29 06:11:41 +00:00
|
|
|
|
2008-12-29 06:30:26 +00:00
|
|
|
ActionController::Base.class_eval do
|
|
|
|
def perform_action
|
|
|
|
perform_action_without_rescue
|
|
|
|
end
|
2008-12-29 06:11:41 +00:00
|
|
|
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
|