Skip to content

Commit

Permalink
Failing test for using plugin middleware in application config
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Jan 25, 2010
1 parent 2d1f9fb commit c6104e6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions railties/test/plugins/vendored_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit c6104e6

Please sign in to comment.