diff options
author | Simon Jefford <simon.jefford@gmail.com> | 2010-05-16 17:52:59 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-16 19:15:24 +0200 |
commit | 7be58b616337d28dc6f25e9dc26cca935437ec12 (patch) | |
tree | 3bb1ba576bb9bf5c186a28de8ff78e15b842df22 /railties/test | |
parent | b7bdacf1abb71ec2b46ea54893fb881dea36cca8 (diff) | |
download | rails-7be58b616337d28dc6f25e9dc26cca935437ec12.tar.gz rails-7be58b616337d28dc6f25e9dc26cca935437ec12.tar.bz2 rails-7be58b616337d28dc6f25e9dc26cca935437ec12.zip |
Tests for new reserved words [#4602 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 8743defe82..3975a39ab1 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -70,8 +70,13 @@ class AppGeneratorTest < Rails::Generators::TestCase 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 |