1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add test for multiple suggested generator names.

This commit is contained in:
Josef Šimánek 2014-09-24 22:17:45 +02:00 committed by Arthur Neves
parent 7f50d63f51
commit b3a16b61fa
No known key found for this signature in database
GPG key ID: 04A390FB1E433E17

View file

@ -34,6 +34,12 @@ class GeneratorsTest < Rails::Generators::TestCase
assert_match "Maybe you meant 'migration'", output
end
def test_generator_multiple_suggestions
name = :tas
output = capture(:stdout){ Rails::Generators.invoke name }
assert_match "Maybe you meant 'task', 'job' or 'assets'", output
end
def test_help_when_a_generator_with_required_arguments_is_invoked_without_arguments
output = capture(:stdout){ Rails::Generators.invoke :model, [] }
assert_match(/Description:/, output)