Skip to content

Commit b3a16b6

Browse files
simiarthurnn
authored andcommitted
Add test for multiple suggested generator names.
1 parent 7f50d63 commit b3a16b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

railties/test/generators_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ def test_generator_suggestions
3434
assert_match "Maybe you meant 'migration'", output
3535
end
3636

37+
def test_generator_multiple_suggestions
38+
name = :tas
39+
output = capture(:stdout){ Rails::Generators.invoke name }
40+
assert_match "Maybe you meant 'task', 'job' or 'assets'", output
41+
end
42+
3743
def test_help_when_a_generator_with_required_arguments_is_invoked_without_arguments
3844
output = capture(:stdout){ Rails::Generators.invoke :model, [] }
3945
assert_match(/Description:/, output)

0 commit comments

Comments
 (0)