diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-13 00:41:04 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-13 01:19:23 +0100 |
commit | da5978c22374b8a3b15a421ff4920e0940435253 (patch) | |
tree | e9a94394f0ce7455cd0f955ede80e0b5f5f573b0 /actionpack/test/abstract_unit.rb | |
parent | 8d78a82d797bf8809acb1d2ebb30cf81488ac99c (diff) | |
download | rails-da5978c22374b8a3b15a421ff4920e0940435253.tar.gz rails-da5978c22374b8a3b15a421ff4920e0940435253.tar.bz2 rails-da5978c22374b8a3b15a421ff4920e0940435253.zip |
Add subscriber for ActionPack and move all logging inside it.
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 3f7a5c89b9..3e631d45df 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -48,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 @@ -93,24 +85,6 @@ class ActiveSupport::TestCase end end -class MockLogger - 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 - - def logged - @logged.compact.map { |l| l.to_s.strip } - end -end - class ActionController::IntegrationTest < ActiveSupport::TestCase def self.build_app(routes = nil) ActionDispatch::MiddlewareStack.new { |middleware| |