Permalink
Browse files

Failing test for using plugin middleware in application config

  • Loading branch information...
1 parent 2d1f9fb commit c6104e6514d7e0af8dca92fcb40a6adb72e16611 @josh josh committed Jan 25, 2010
Showing with 20 additions and 0 deletions.
  1. +20 −0 railties/test/plugins/vendored_test.rb
@@ -252,6 +252,26 @@ def self.call(env)
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

0 comments on commit c6104e6

Please sign in to comment.