aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-17 03:20:30 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-17 03:20:30 +0530
commitb04230e3bbf912d60601e9e7b797c4cd43581d51 (patch)
tree97a2f784a2ec2bfae4f960af56a9280dad6f7774 /actionpack/test/abstract_unit.rb
parent867829b187969607aa12f2b0457f25da9c204db0 (diff)
parent6e3bee6cf1f0d2684152292db0a8b757249824fd (diff)
downloadrails-b04230e3bbf912d60601e9e7b797c4cd43581d51.tar.gz
rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.tar.bz2
rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.zip
Merge remote branch 'mainstream/master'
Conflicts: actionpack/lib/action_controller/metal/flash.rb
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r--actionpack/test/abstract_unit.rb30
1 files changed, 3 insertions, 27 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index 8c65087898..10913c0fdb 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -19,8 +19,6 @@ require 'action_view'
require 'action_view/base'
require 'action_dispatch'
require 'fixture_template'
-require 'active_support/test_case'
-require 'action_view/test_case'
require 'active_support/dependencies'
activemodel_path = File.expand_path('../../../activemodel/lib', __FILE__)
@@ -50,14 +48,6 @@ ORIGINAL_LOCALES = I18n.available_locales.map {|locale| locale.to_s }.sort
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
FIXTURES = Pathname.new(FIXTURE_LOAD_PATH)
-# Turn on notifications
-require 'active_support/notifications'
-Thread.abort_on_exception = true
-
-ActiveSupport::Notifications.subscribe do |*args|
- ActionController::Base.log_event(*args) if ActionController::Base.logger
-end
-
module SetupOnce
extend ActiveSupport::Concern
@@ -95,29 +85,15 @@ class ActiveSupport::TestCase
end
end
-class MockLogger
- attr_reader :logged
- attr_accessor :level
-
- def initialize
- @level = Logger::DEBUG
- @logged = []
- end
-
- def method_missing(method, *args, &blk)
- @logged << args.first
- @logged << blk.call if block_given?
- end
-end
-
class ActionController::IntegrationTest < ActiveSupport::TestCase
def self.build_app(routes = nil)
+ ActionDispatch::Flash
ActionDispatch::MiddlewareStack.new { |middleware|
- middleware.use "ActionDispatch::StringCoercion"
middleware.use "ActionDispatch::ShowExceptions"
middleware.use "ActionDispatch::Callbacks"
middleware.use "ActionDispatch::ParamsParser"
- middleware.use "Rack::Head"
+ middleware.use "ActionDispatch::Flash"
+ middleware.use "ActionDispatch::Head"
}.build(routes || ActionController::Routing::Routes)
end