Skip to content

Commit

Permalink
Add a failing test for ticket #4874
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jun 17, 2010
1 parent 5cd3c2a commit 7ba7562
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions railties/test/application/routing_test.rb
Expand Up @@ -69,6 +69,20 @@ def foo_or_bar?
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
Expand Down

0 comments on commit 7ba7562

Please sign in to comment.