提交 7be58b61 编写于 作者: S Simon Jefford 提交者: José Valim

Tests for new reserved words [#4602 state:resolved]

Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 b7bdacf1
......@@ -70,8 +70,13 @@ def test_options_before_application_name_raises_an_error
end
def test_name_collision_raises_an_error
content = capture(:stderr){ run_generator [File.join(destination_root, "generate")] }
assert_equal "Invalid application name generate. Please give a name which does not match one of the reserved rails words.\n", content
reserved_words = %w[generate g console c server s dbconsole db
application destroy benchmarker profiler
plugin runner test]
reserved_words.each do |reserved|
content = capture(:stderr){ run_generator [File.join(destination_root, reserved)] }
assert_equal "Invalid application name #{reserved}. Please give a name which does not match one of the reserved rails words.\n", content
end
end
def test_invalid_database_option_raises_an_error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册