diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb index 22de6402365d2607db018d01043deccdbab7562f..25372d0a5055a7a9d1cdc15aff981a7598bf01ff 100644 --- a/railties/test/application/routing_test.rb +++ b/railties/test/application/routing_test.rb @@ -277,6 +277,30 @@ def baz end end + def test_root_path + app('development') + + controller :foo, <<-RUBY + class FooController < ApplicationController + def index + render :text => "foo" + end + end + RUBY + + app_file 'config/routes.rb', <<-RUBY + AppTemplate::Application.routes.draw do + get 'foo', :to => 'foo#index' + root :to => 'foo#index' + end + RUBY + + remove_file 'public/index.html' + + get '/' + assert_equal 'foo', last_response.body + end + test 'routes are added and removed when reloading' do app('development')