aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-02-16 21:37:30 +0100
committerJosé Valim <jose.valim@gmail.com>2010-02-16 22:39:07 +0100
commit01cd9d66ede0a528725728f2d73cf6e7796ccb02 (patch)
tree30e04e4acdb29a97db5686cc5f366ca2478fa594 /railties/test
parentf0523f72b46db14e2f50c8347a8708734c650f84 (diff)
downloadrails-01cd9d66ede0a528725728f2d73cf6e7796ccb02.tar.gz
rails-01cd9d66ede0a528725728f2d73cf6e7796ccb02.tar.bz2
rails-01cd9d66ede0a528725728f2d73cf6e7796ccb02.zip
Subscriber should not explode if a non namespaced instrumentation is given.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/log_subscriber_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/test/log_subscriber_test.rb b/railties/test/log_subscriber_test.rb
index be176df1bb..a4de023e65 100644
--- a/railties/test/log_subscriber_test.rb
+++ b/railties/test/log_subscriber_test.rb
@@ -79,7 +79,7 @@ class SyncLogSubscriberTest < ActiveSupport::TestCase
Rails::LogSubscriber.add :my_log_subscriber, @log_subscriber
instrument "my_log_subscriber.unknown_event"
wait
- # If we get here, it means that NoMethodError was raised.
+ # If we get here, it means that NoMethodError was not raised.
end
def test_does_not_send_the_event_if_logger_is_nil
@@ -90,6 +90,12 @@ class SyncLogSubscriberTest < ActiveSupport::TestCase
wait
end
+ def test_does_not_fail_with_non_namespaced_events
+ Rails::LogSubscriber.add :my_log_subscriber, @log_subscriber
+ instrument "whatever"
+ wait
+ end
+
def test_flushes_loggers
Rails::LogSubscriber.add :my_log_subscriber, @log_subscriber
Rails::LogSubscriber.flush_all!