class SubscriberTest
Public Instance Methods
setup()
click to toggle source
# File activesupport/test/subscriber_test.rb, line 35 def setup TestSubscriber.clear end
test_attaches_only_one_subscriber()
click to toggle source
# File activesupport/test/subscriber_test.rb, line 45 def test_attaches_only_one_subscriber ActiveSupport::Notifications.instrument("open_party.doodle") assert_equal 1, TestSubscriber.events.size end
test_attaches_subscribers()
click to toggle source
# File activesupport/test/subscriber_test.rb, line 39 def test_attaches_subscribers ActiveSupport::Notifications.instrument("open_party.doodle") assert_equal "open_party.doodle", TestSubscriber.events.first.name end
test_does_not_attach_private_methods()
click to toggle source
# File activesupport/test/subscriber_test.rb, line 51 def test_does_not_attach_private_methods ActiveSupport::Notifications.instrument("private_party.doodle") assert_equal [], TestSubscriber.events end