From d4e008fd0f9ebac3383a0c3ac093de68db9e2e66 Mon Sep 17 00:00:00 2001 From: Kyle Maxwell Date: Thu, 11 Feb 2010 16:04:24 -0800 Subject: Invalid namespace on app generation raises an error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/test/generators/app_generator_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/test') 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 -- cgit v1.2.3