aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/plugin_locator_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-21 22:31:19 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-21 22:31:19 +0000
commit6dd10d85dab9d2623deb3dc4a61106ca9be1d981 (patch)
tree7180753dbf40f804418b983f542d66b3fb3c5e1b /railties/test/plugin_locator_test.rb
parent83c17f208933bb895faf9a18194f8a407c194f05 (diff)
downloadrails-6dd10d85dab9d2623deb3dc4a61106ca9be1d981.tar.gz
rails-6dd10d85dab9d2623deb3dc4a61106ca9be1d981.tar.bz2
rails-6dd10d85dab9d2623deb3dc4a61106ca9be1d981.zip
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
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)