diff options
author | Michael Koziarski <michael@koziarski.com> | 2006-12-16 02:22:23 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2006-12-16 02:22:23 +0000 |
commit | 23c2768421a6be1671ca8e18ce09b6d7c25cf603 (patch) | |
tree | 3107b830bac34df9a08b64f1f015c13368853ab8 /railties/test | |
parent | 39686e5370461da37d1f5119e4dcc74d8ec26b77 (diff) | |
download | rails-23c2768421a6be1671ca8e18ce09b6d7c25cf603.tar.gz rails-23c2768421a6be1671ca8e18ce09b6d7c25cf603.tar.bz2 rails-23c2768421a6be1671ca8e18ce09b6d7c25cf603.zip |
Revert [5720]
Reopens #6581
Reopens #6842
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5722 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/plugin_test.rb | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/railties/test/plugin_test.rb b/railties/test/plugin_test.rb index 20c1e1a872..5ab1e15414 100644 --- a/railties/test/plugin_test.rb +++ b/railties/test/plugin_test.rb @@ -43,7 +43,7 @@ class PluginTest < Test::Unit::TestCase def test_load_plugin stubby = "#{File.dirname(__FILE__)}/fixtures/plugins/default/stubby" - expected = ['stubby'] + expected = Set.new(['stubby']) assert @init.send(:load_plugin, stubby) assert_equal expected, @init.loaded_plugins @@ -66,36 +66,10 @@ class PluginTest < Test::Unit::TestCase def test_load_plugins_from_two_sources assert_loaded_plugins %w(a stubby acts_as_chunky_bacon), ['default', 'alternate'] end - - def test_load_all_plugins_when_config_plugins_is_nil - @init.configuration.plugins = nil - assert_loaded_plugins %w(a stubby acts_as_chunky_bacon), ['default', 'alternate'] - end - def test_load_no_plugins_when_config_plugins_is_empty_array - @init.configuration.plugins = [] - assert_loaded_plugins [], ['default', 'alternate'] - end - - def test_load_only_selected_plugins - plugins = %w(stubby a) - @init.configuration.plugins = plugins - assert_loaded_plugins plugins, ['default', 'alternate'] - end - - def test_load_plugins_in_order - plugins = %w(stubby acts_as_chunky_bacon a) - @init.configuration.plugins = plugins - assert_plugin_load_order plugins, ['default', 'alternate'] - end - protected def assert_loaded_plugins(plugins, path) - assert_equal plugins.sort, load_plugins(path).sort - end - - def assert_plugin_load_order(plugins, path) - assert_equal plugins, load_plugins(path) + assert_equal Set.new(plugins), load_plugins(path) end def load_plugins(*paths) |