aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-01-25 12:55:30 -0600
committerJoshua Peek <josh@joshpeek.com>2010-01-25 12:55:30 -0600
commitc6104e6514d7e0af8dca92fcb40a6adb72e16611 (patch)
treea13c72508499d904f92efdaf618b4ac999785df6 /railties
parent2d1f9fb98f6b4f7afa469eba57eac4041c8ee539 (diff)
downloadrails-c6104e6514d7e0af8dca92fcb40a6adb72e16611.tar.gz
rails-c6104e6514d7e0af8dca92fcb40a6adb72e16611.tar.bz2
rails-c6104e6514d7e0af8dca92fcb40a6adb72e16611.zip
Failing test for using plugin middleware in application config
Diffstat (limited to 'railties')
-rw-r--r--railties/test/plugins/vendored_test.rb20
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