diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/plugins/vendored_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
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 |