aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/plugins
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-17 03:20:30 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-17 03:20:30 +0530
commitb04230e3bbf912d60601e9e7b797c4cd43581d51 (patch)
tree97a2f784a2ec2bfae4f960af56a9280dad6f7774 /railties/test/plugins
parent867829b187969607aa12f2b0457f25da9c204db0 (diff)
parent6e3bee6cf1f0d2684152292db0a8b757249824fd (diff)
downloadrails-b04230e3bbf912d60601e9e7b797c4cd43581d51.tar.gz
rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.tar.bz2
rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.zip
Merge remote branch 'mainstream/master'
Conflicts: actionpack/lib/action_controller/metal/flash.rb
Diffstat (limited to 'railties/test/plugins')
-rw-r--r--railties/test/plugins/configuration_test.rb9
-rw-r--r--railties/test/plugins/vendored_test.rb8
2 files changed, 16 insertions, 1 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
diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb
index 9a2d40cad8..b3b85891b2 100644
--- a/railties/test/plugins/vendored_test.rb
+++ b/railties/test/plugins/vendored_test.rb
@@ -191,5 +191,11 @@ module PluginsTest
boot_rails
assert_equal [:a, :c, :b], $arr
end
+
+ test "plugin order array is strings" do
+ add_to_config "config.plugins = %w( c_plugin all )"
+ boot_rails
+ assert_equal [:c, :a, :b], $arr
+ end
end
-end \ No newline at end of file
+end