aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/railties/plugin_test.rb20
-rw-r--r--railties/test/railties/shared_tests.rb10
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