diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-17 11:29:41 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-17 11:35:48 +0100 |
commit | 8f5e733998c2f06b63e72072c152546f2074c08e (patch) | |
tree | 46e6497fb3e714e12462012394606ef5c7b24791 /railties/test | |
parent | 0334f9f6cfa4c4c746de7e19250a13366b616c55 (diff) | |
download | rails-8f5e733998c2f06b63e72072c152546f2074c08e.tar.gz rails-8f5e733998c2f06b63e72072c152546f2074c08e.tar.bz2 rails-8f5e733998c2f06b63e72072c152546f2074c08e.zip |
Add notifications to default middleware stack and update subscriber tests.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/middleware_test.rb | 1 | ||||
-rw-r--r-- | railties/test/application/notifications_test.rb | 2 | ||||
-rw-r--r-- | railties/test/subscriber_test.rb | 6 |
3 files changed, 5 insertions, 4 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index f2bfeb79fe..1c5cc62ecd 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -18,6 +18,7 @@ module ApplicationTests "Rack::Lock", "Rack::Runtime", "ActionDispatch::ShowExceptions", + "ActionDispatch::Notifications", "ActionDispatch::Callbacks", "ActionDispatch::Cookies", "ActionDispatch::Session::CookieStore", diff --git a/railties/test/application/notifications_test.rb b/railties/test/application/notifications_test.rb index 1eb0777db8..db8605edbe 100644 --- a/railties/test/application/notifications_test.rb +++ b/railties/test/application/notifications_test.rb @@ -64,7 +64,7 @@ module ApplicationTests ActiveRecord::Base.logger = logger = MockLogger.new - # Mimic an ActiveRecord notifications + # Mimic ActiveRecord notifications instrument "active_record.sql", :name => "SQL", :sql => "SHOW tables" wait diff --git a/railties/test/subscriber_test.rb b/railties/test/subscriber_test.rb index ac34939510..fa3f7bfabb 100644 --- a/railties/test/subscriber_test.rb +++ b/railties/test/subscriber_test.rb @@ -92,7 +92,7 @@ module SubscriberTest def test_flushes_loggers_when_action_dispatch_callback_is_received Rails::Subscriber.add :my_subscriber, @subscriber - instrument "action_dispatch.callback" + instrument "action_dispatch.after_dispatch" wait assert_equal 1, @logger.flush_count end @@ -100,7 +100,7 @@ module SubscriberTest def test_flushes_the_same_logger_just_once Rails::Subscriber.add :my_subscriber, @subscriber Rails::Subscriber.add :another, @subscriber - instrument "action_dispatch.callback" + instrument "action_dispatch.after_dispatch" wait assert_equal 1, @logger.flush_count end @@ -111,7 +111,7 @@ module SubscriberTest Rails::Subscriber.log_tailer = log_tailer Rails::Subscriber.add :my_subscriber, @subscriber - instrument "action_dispatch.callback" + instrument "action_dispatch.after_dispatch" wait ensure Rails::Subscriber.log_tailer = nil |