aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/app_generator_test.rb')
-rw-r--r--railties/test/generators/app_generator_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 0a746b200f..412034029e 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
@@ -102,6 +107,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_prototype_and_test_unit_are_skipped_if_required
run_generator [destination_root, "--skip-prototype", "--skip-testunit"]
assert_no_file "public/javascripts/prototype.js"
+ assert_file "public/javascripts"
assert_no_file "test"
end