diff options
author | Matthew Rudy Jacobs <matthewrudyjacobs@gmail.com> | 2009-02-22 19:23:04 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2009-02-27 14:37:11 +0100 |
commit | 319106d09c0ec2daf8b5345f525f1c97b6368ce2 (patch) | |
tree | 55bbda458e3428bffcad2fa591f02c2ba961fbff /railties/test | |
parent | 6de83562f91028629bd24447aa521bc72ef8277a (diff) | |
download | rails-319106d09c0ec2daf8b5345f525f1c97b6368ce2.tar.gz rails-319106d09c0ec2daf8b5345f525f1c97b6368ce2.tar.bz2 rails-319106d09c0ec2daf8b5345f525f1c97b6368ce2.zip |
Metal can now line in plugins under app/metal [#2045 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb | 10 | ||||
-rw-r--r-- | railties/test/plugin_loader_test.rb | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb b/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb new file mode 100644 index 0000000000..d67a127ca7 --- /dev/null +++ b/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb @@ -0,0 +1,10 @@ +class EngineMetal + def self.call(env) + if env["PATH_INFO"] =~ /^\/metal/ + [200, {"Content-Type" => "text/html"}, ["Engine metal"]] + else + [404, {"Content-Type" => "text/html"}, ["Not Found"]] + end + end +end + diff --git a/railties/test/plugin_loader_test.rb b/railties/test/plugin_loader_test.rb index e802b1ace7..b270748dd6 100644 --- a/railties/test/plugin_loader_test.rb +++ b/railties/test/plugin_loader_test.rb @@ -120,7 +120,7 @@ class TestPluginLoader < Test::Unit::TestCase @loader.add_plugin_load_paths - %w( models controllers helpers ).each do |app_part| + %w( models controllers metal helpers ).each do |app_part| assert ActiveSupport::Dependencies.load_paths.include?( File.join(plugin_fixture_path('engines/engine'), 'app', app_part) ), "Couldn't find #{app_part} in load path" @@ -161,4 +161,4 @@ class TestPluginLoader < Test::Unit::TestCase $LOAD_PATH.clear ORIGINAL_LOAD_PATH.each { |path| $LOAD_PATH << path } end -end
\ No newline at end of file +end |