From c6104e6514d7e0af8dca92fcb40a6adb72e16611 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 25 Jan 2010 12:55:30 -0600 Subject: Failing test for using plugin middleware in application config --- railties/test/plugins/vendored_test.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'railties/test/plugins/vendored_test.rb') diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 3977099184..41073d33a2 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -252,6 +252,26 @@ YAML assert_equal "FooMetal", last_response.body end + test "use plugin middleware in application config" do + plugin "foo" do |plugin| + plugin.write "lib/foo.rb", <<-RUBY + class Foo + def initialize(app) + @app = app + end + + def call(env) + @app.call(env) + end + end + RUBY + end + + add_to_config "config.middleware.use :Foo" + + boot_rails + end + test "namespaced controllers with namespaced routes" do @plugin.write "config/routes.rb", <<-RUBY ActionController::Routing::Routes.draw do -- cgit v1.2.3