提交 38492590 编写于 作者: G Genadi Samokovarov

Introduce new welcome page for new projects

As requested by David in 23233.
上级 6dfab475
......@@ -42,8 +42,7 @@ def teardown
test "root takes precedence over internal welcome controller" do
app("development")
get '/'
assert_match %r{<h1>Getting started</h1>} , last_response.body
assert_welcome get('/')
controller :foo, <<-RUBY
class FooController < ApplicationController
......
......@@ -74,10 +74,12 @@ def get(path)
end
def assert_welcome(resp)
resp = Array(resp)
assert_equal 200, resp[0]
assert_match 'text/html', resp[1]["Content-Type"]
assert_match 'charset=utf-8', resp[1]["Content-Type"]
assert extract_body(resp).match(/Welcome aboard/)
assert extract_body(resp).match(/Yay! You.*re on Rails!/)
end
def assert_success(resp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册