Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit 7be58b616337d28dc6f25e9dc26cca935437ec12 1 parent b7bdacf
@simonjefford simonjefford authored josevalim committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 railties/test/generators/app_generator_test.rb
View
9 railties/test/generators/app_generator_test.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.