aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/plugin_locator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/plugin_locator_test.rb')
-rw-r--r--railties/test/plugin_locator_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/plugin_locator_test.rb b/railties/test/plugin_locator_test.rb
index 36f9e272e4..cf6c0d9507 100644
--- a/railties/test/plugin_locator_test.rb
+++ b/railties/test/plugin_locator_test.rb
@@ -26,6 +26,20 @@ class TestPluginFileSystemLocator < Test::Unit::TestCase
assert_equal %w(a acts_as_chunky_bacon plugin_with_no_lib_dir stubby), @locator.plugin_names, failure_tip
end
+ def test_all_plugins_loaded_when_all_is_used
+ plugin_names = ['stubby', 'acts_as_chunky_bacon', :all]
+ only_load_the_following_plugins! plugin_names
+ failure_tip = "It's likely someone has added a new plugin fixture without updating this list"
+ assert_equal %w(stubby acts_as_chunky_bacon a plugin_with_no_lib_dir), @locator.plugin_names, failure_tip
+ end
+
+ def test_all_plugins_loaded_after_all
+ plugin_names = ['stubby', :all, 'acts_as_chunky_bacon']
+ only_load_the_following_plugins! plugin_names
+ failure_tip = "It's likely someone has added a new plugin fixture without updating this list"
+ assert_equal %w(stubby a plugin_with_no_lib_dir acts_as_chunky_bacon ), @locator.plugin_names, failure_tip
+ end
+
def test_registering_a_plugin_name_that_does_not_exist_raises_a_load_error
only_load_the_following_plugins! %w(stubby acts_as_a_non_existant_plugin)