diff options
author | Ravinder Singh <ravinderrana30@gmail.com> | 2010-04-16 16:58:14 +0530 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-29 13:00:17 +0200 |
commit | e9a9ef094e84abfe6a0167e9255abcf5b63412d9 (patch) | |
tree | 214629eca606ae695edd8eb3f5e77fde44b5f40c /railties/test/generators | |
parent | d793d30776737e46ead49d90dcba411c3dfd6edf (diff) | |
download | rails-e9a9ef094e84abfe6a0167e9255abcf5b63412d9.tar.gz rails-e9a9ef094e84abfe6a0167e9255abcf5b63412d9.tar.bz2 rails-e9a9ef094e84abfe6a0167e9255abcf5b63412d9.zip |
warn user if options are given before application name [#3435 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 24e6d541c2..e57b5e19b4 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -58,6 +58,11 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_no_file "public/stylesheets/application.css" end + def test_options_before_application_name_raises_an_error + content = capture(:stderr){ run_generator(["--skip-activerecord", destination_root]) } + assert_equal "Options should be given after the application name. For details run: rails --help\n", content + 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 |