diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/helper_generator_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators/helper_generator_test.rb b/railties/test/generators/helper_generator_test.rb index 56e66a7c41..9b2f277f54 100644 --- a/railties/test/generators/helper_generator_test.rb +++ b/railties/test/generators/helper_generator_test.rb @@ -4,6 +4,7 @@ require 'generators/rails/helper/helper_generator' require 'generators/test_unit/helper/helper_generator' ObjectHelper = Class.new +AnotherObjectHelperTest = Class.new class HelperGeneratorTest < GeneratorsTestCase @@ -27,6 +28,11 @@ class HelperGeneratorTest < GeneratorsTestCase assert_match /The name 'ObjectHelper' is either already used in your application or reserved/, content end + def test_check_class_collision_on_tests + content = capture(:stderr){ run_generator ["another_object"] } + assert_match /The name 'AnotherObjectHelperTest' is either already used in your application or reserved/, content + end + protected def run_generator(args=["admin"]) |