From 6dd10d85dab9d2623deb3dc4a61106ca9be1d981 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 21 Sep 2007 22:31:19 +0000 Subject: Added the :all option to config.plugins thatll include the rest of the plugins not already explicitly named (closes #9613) [fcheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7531 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/test/plugin_locator_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'railties/test/plugin_locator_test.rb') 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) -- cgit v1.2.3