diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-06-12 17:48:30 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-06-12 17:48:30 -0500 |
commit | ea3a7e1bb1efc8b3ca10c4163bc116f3d5e23af1 (patch) | |
tree | a3cce25be0c613a8e1444e1d0ff53aaed3497057 /railties/test/plugin_test.rb | |
parent | 556204abaf95f7c995576cb1358f13de406682ab (diff) | |
parent | dd4181f47dc0f166eb5d3e47a4a0dc1594cc5669 (diff) | |
download | rails-ea3a7e1bb1efc8b3ca10c4163bc116f3d5e23af1.tar.gz rails-ea3a7e1bb1efc8b3ca10c4163bc116f3d5e23af1.tar.bz2 rails-ea3a7e1bb1efc8b3ca10c4163bc116f3d5e23af1.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'railties/test/plugin_test.rb')
-rw-r--r-- | railties/test/plugin_test.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/railties/test/plugin_test.rb b/railties/test/plugin_test.rb index 1445338f14..50124240a5 100644 --- a/railties/test/plugin_test.rb +++ b/railties/test/plugin_test.rb @@ -5,9 +5,10 @@ uses_mocha "Plugin Tests" do class PluginTest < Test::Unit::TestCase def setup - @initializer = Rails::Initializer.new(Rails::Configuration.new) - @valid_plugin_path = plugin_fixture_path('default/stubby') - @empty_plugin_path = plugin_fixture_path('default/empty') + @initializer = Rails::Initializer.new(Rails::Configuration.new) + @valid_plugin_path = plugin_fixture_path('default/stubby') + @empty_plugin_path = plugin_fixture_path('default/empty') + @gemlike_plugin_path = plugin_fixture_path('default/gemlike') end def test_should_determine_plugin_name_from_the_directory_of_the_plugin @@ -70,7 +71,14 @@ uses_mocha "Plugin Tests" do plugin.stubs(:evaluate_init_rb) plugin.send(:load, @initializer) end - + + # This path is fine so nothing is raised + assert_nothing_raised do + plugin = plugin_for(@gemlike_plugin_path) + plugin.stubs(:evaluate_init_rb) + plugin.send(:load, @initializer) + end + # This is an empty path so it raises assert_raises(LoadError) do plugin = plugin_for(@empty_plugin_path) |