diff options
Diffstat (limited to 'railties/test/plugins')
-rw-r--r-- | railties/test/plugins/vendored_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 05c01846e1..3977099184 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -37,6 +37,19 @@ module PluginsTest assert_equal "Bukkits", Bukkits.name end + test "plugin init is ran before application initializers" do + plugin "foo", "$foo = true" do |plugin| + plugin.write "lib/foo.rb", "module Foo; end" + end + + app_file 'config/initializers/foo.rb', <<-RUBY + raise "no $foo" unless $foo + raise "no Foo" unless Foo + RUBY + + boot_rails + end + test "plugin paths get added to the AS::Dependency list" do boot_rails assert_equal "Bukkits", Bukkits.name |