diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/plugins/configuration_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/plugins/configuration_test.rb b/railties/test/plugins/configuration_test.rb index 25bf24eb3b..09f8943af9 100644 --- a/railties/test/plugins/configuration_test.rb +++ b/railties/test/plugins/configuration_test.rb @@ -32,5 +32,14 @@ module PluginsTest assert_equal "hello", MyApp.config.foo.greetings assert_equal "bar", MyApp.config.foo.bar end + + test "plugin can add subscribers" do + begin + class Foo < Rails::Railtie; subscriber(Rails::Subscriber.new); end + assert_kind_of Rails::Subscriber, Rails::Subscriber.subscribers[:foo] + ensure + Rails::Subscriber.subscribers.clear + end + end end end |