diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-10-10 17:15:11 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-10-10 17:15:11 +0100 |
commit | 66ee2654ff243f03595a402fa15e1eea1b5b45be (patch) | |
tree | 3f1055e03082f0c767719e8cba5155e4207779e0 /railties/test/plugin_locator_test.rb | |
parent | dd2779e1b83b4d867d47dd286ec0c919f5df12a9 (diff) | |
parent | b9ce8216fa849a47ad0b0f99fa510e226a23c12e (diff) | |
download | rails-66ee2654ff243f03595a402fa15e1eea1b5b45be.tar.gz rails-66ee2654ff243f03595a402fa15e1eea1b5b45be.tar.bz2 rails-66ee2654ff243f03595a402fa15e1eea1b5b45be.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'railties/test/plugin_locator_test.rb')
-rw-r--r-- | railties/test/plugin_locator_test.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/railties/test/plugin_locator_test.rb b/railties/test/plugin_locator_test.rb index da1548dee1..ef57e7ed4c 100644 --- a/railties/test/plugin_locator_test.rb +++ b/railties/test/plugin_locator_test.rb @@ -1,5 +1,15 @@ require 'plugin_test_helper' +# TODO: Rewrite all these tests +class FakeInitializerSlashApplication + attr_reader :config + alias configuration config + + def initialize + @config = Rails::Configuration.new + end +end + class PluginLocatorTest < Test::Unit::TestCase def test_should_require_subclasses_to_implement_the_plugins_method assert_raise(RuntimeError) do @@ -23,12 +33,12 @@ end class PluginFileSystemLocatorTest < Test::Unit::TestCase def setup - @configuration = Rails::Configuration.new + @initializer = FakeInitializerSlashApplication.new + @configuration = @initializer.config + Rails.application = @initializer # We need to add our testing plugin directory to the plugin paths so # the locator knows where to look for our plugins @configuration.plugin_paths << plugin_fixture_root_path - @initializer = Rails::Initializer.default - @initializer.config = @configuration @locator = Rails::Plugin::FileSystemLocator.new(@initializer) @valid_plugin_path = plugin_fixture_path('default/stubby') @empty_plugin_path = plugin_fixture_path('default/empty') |