diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-23 23:50:24 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-23 23:50:53 +0100 |
commit | 5c41cb77d9af28fe6495d5c4047483ce3ceadfe6 (patch) | |
tree | cc9ab8088b2d3b05d372db80bb77d79c8f52b32e /railties/test | |
parent | cc0e402aa870fa710d6b6189dc090244b4462308 (diff) | |
download | rails-5c41cb77d9af28fe6495d5c4047483ce3ceadfe6.tar.gz rails-5c41cb77d9af28fe6495d5c4047483ce3ceadfe6.tar.bz2 rails-5c41cb77d9af28fe6495d5c4047483ce3ceadfe6.zip |
Ensure lib/rails/initializers/*.rb also works for gems.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/railties/plugin_test.rb | 20 | ||||
-rw-r--r-- | railties/test/railties/shared_tests.rb | 10 |
2 files changed, 10 insertions, 20 deletions
diff --git a/railties/test/railties/plugin_test.rb b/railties/test/railties/plugin_test.rb index 4ea5460a68..6081890fcb 100644 --- a/railties/test/railties/plugin_test.rb +++ b/railties/test/railties/plugin_test.rb @@ -94,26 +94,6 @@ module RailtiesTest assert rescued, "Expected boot rails to fail" end - test "loads lib/rails/initializers/foo.rb" do - @plugin.write "lib/rails/initializers/foo.rb", <<-RUBY - $loaded = true - RUBY - - boot_rails - assert $loaded - end - - test "loads vendored rails/initializers/foo thats already in the $LOAD_PATH" do - $: << "#{app_path}/vendor/foo/lib" - - app_file "vendor/foo/lib/rails/initializers/foo.rb", <<-RUBY - $loaded = true - RUBY - - boot_rails - assert $loaded - end - test "skips init.rb if initializer is present" do @plugin.write "lib/rails/initializers/foo.rb", <<-RUBY $loaded = true diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index 83d25be5db..48539c2e99 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -297,6 +297,16 @@ YAML assert $plugin_initializer end + def test_rails_plugin_initializers + $plugin_initializer = false + @plugin.write "lib/rails/initializers/foo.rb", <<-RUBY + $plugin_initializer = true + RUBY + + boot_rails + assert $plugin_initializer + end + def test_plugin_midleware_referenced_in_configuration @plugin.write "lib/bukkits.rb", <<-RUBY class Bukkits |