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:
parent
7f50d63f51
commit
b3a16b61fa
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue