diff options
-rw-r--r-- | railties/test/application/routing_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb index dcac1a87d9..f0268164d0 100644 --- a/railties/test/application/routing_test.rb +++ b/railties/test/application/routing_test.rb @@ -69,6 +69,20 @@ module ApplicationTests assert_equal 'bar', last_response.body end + test "mount rack app" do + app_file 'config/routes.rb', <<-RUBY + AppTemplate::Application.routes.draw do |map| + mount lambda { |env| [200, {}, [env["PATH_INFO"]]] }, :at => "/blog" + # The line below is required because mount sometimes + # fails when a resource route is added. + resource :user + end + RUBY + + get '/blog/archives' + assert_equal '/archives', last_response.body + end + test "multiple controllers" do controller :foo, <<-RUBY class FooController < ApplicationController |