提交 94e68e7a 编写于 作者: A Aaron Patterson

adding a test for root path in the app

上级 5e4683f7
......@@ -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')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册