File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ def test_find_command_unknown_suggestions
8080 message = "Unknown command pish" . dup
8181
8282 if defined? ( DidYouMean )
83+ assert_operator Gem ::UnknownCommandError , :< , DidYouMean ::Correctable
84+ assert_operator Gem ::UnknownCommandError , :instance_variable_defined? , :@attached
85+ assert_send [ Gem ::UnknownCommandError , :instance_variable_get , :@attached ]
8386 message << "\n Did you mean? \" push\" "
8487 end
8588
@@ -90,10 +93,10 @@ def test_find_command_unknown_suggestions
9093 end
9194
9295 assert_equal message , actual_message , proc { |msg |
93- msg + {
94- unknown_command : e . unknown_command ,
95- spell_checker : e . spell_checker ,
96- corrections : e . corrections ,
96+ ( msg || "" ) + {
97+ unknown_command : e . unknown_command ,
98+ spell_checker : ( e . spell_checker rescue nil ) ,
99+ corrections : ( e . corrections rescue nil ) ,
97100 } . pretty_inspect
98101 }
99102 end
You can’t perform that action at this time.
0 commit comments