diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-26 14:51:15 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-26 14:51:15 -0300 |
commit | 70d126779eece0b2b16dcdb7229cfc3e2f4dabcf (patch) | |
tree | 9fe29b4973ca41c86a50575a388ac059da7da323 /railties/test | |
parent | b4ea6054588b06ef0418bd7d15e88d63a4f9035f (diff) | |
parent | e83ce84ef991f06d15d66dce27f06e01477b617e (diff) | |
download | rails-70d126779eece0b2b16dcdb7229cfc3e2f4dabcf.tar.gz rails-70d126779eece0b2b16dcdb7229cfc3e2f4dabcf.tar.bz2 rails-70d126779eece0b2b16dcdb7229cfc3e2f4dabcf.zip |
Merge pull request #15294 from schneems/schneems/generator-output-in-error2
print generators on failed generate
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index eac28badfe..8d6dbf80c2 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -21,8 +21,10 @@ class GeneratorsTest < Rails::Generators::TestCase end def test_invoke_when_generator_is_not_found - output = capture(:stdout){ Rails::Generators.invoke :unknown } - assert_equal "Could not find generator unknown.\n", output + name = :unknown + output = capture(:stdout){ Rails::Generators.invoke name } + assert_match "Could not find generator '#{name}'", output + assert_match "scaffold", output end def test_help_when_a_generator_with_required_arguments_is_invoked_without_arguments |