diff options
author | Kyle Maxwell <kyle@kylemaxwell.com> | 2010-02-11 16:04:24 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-17 00:38:30 +0100 |
commit | d4e008fd0f9ebac3383a0c3ac093de68db9e2e66 (patch) | |
tree | 768cc1c8a7f73699a834718dc3eb7b6712f19a34 /railties/test/generators | |
parent | 23fd1f12801c8585ff3b114e74264b67ad6264e9 (diff) | |
download | rails-d4e008fd0f9ebac3383a0c3ac093de68db9e2e66.tar.gz rails-d4e008fd0f9ebac3383a0c3ac093de68db9e2e66.tar.bz2 rails-d4e008fd0f9ebac3383a0c3ac093de68db9e2e66.zip |
Invalid namespace on app generation raises an error
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 0a746b200f..01d643cd8c 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -50,6 +50,11 @@ class AppGeneratorTest < Rails::Generators::TestCase ).each{ |path| assert_file path } 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 + end + def test_invalid_database_option_raises_an_error content = capture(:stderr){ run_generator([destination_root, "-d", "unknown"]) } assert_match /Invalid value for \-\-database option/, content |