From 9f53e09eb9b4eb2e1711a8e92b7244a1f1301bbc Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Sat, 3 Mar 2007 02:53:06 +0000 Subject: Move responsibility for ensuring that all registered gems were loaded from the FileSystemLocator into the Initializer once all locators have had a chance to load the gems they located. [Marcel Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/test/plugin_locator_test.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'railties/test') diff --git a/railties/test/plugin_locator_test.rb b/railties/test/plugin_locator_test.rb index 5ea89844d0..36f9e272e4 100644 --- a/railties/test/plugin_locator_test.rb +++ b/railties/test/plugin_locator_test.rb @@ -21,21 +21,21 @@ class TestPluginFileSystemLocator < Test::Unit::TestCase assert_equal plugin_names, @locator.plugin_names end + def test_all_plugins_are_loaded_when_registered_plugin_list_is_untouched + failure_tip = "It's likely someone has added a new plugin fixture without updating this list" + assert_equal %w(a acts_as_chunky_bacon plugin_with_no_lib_dir stubby), @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) assert_raises(LoadError) do - @locator.plugins + @initializer.load_plugins end end - def test_all_plugins_are_loaded_when_registered_plugin_list_is_untouched - failure_tip = "It's likely someone has added a new plugin fixture without updating this list" - assert_equal %w(a acts_as_chunky_bacon plugin_with_no_lib_dir stubby), @locator.plugin_names, failure_tip - end - private def new_locator(initializer = @initializer) Rails::Plugin::FileSystemLocator.new(initializer) - end - + end end \ No newline at end of file -- cgit v1.2.3