File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: false
2
2
require "test/unit"
3
+ require "pathname"
3
4
require "irb"
4
5
5
6
module TestIRB
@@ -96,7 +97,7 @@ def test_complete_require_with_pathname_in_load_path
96
97
$LOAD_PATH << test_path
97
98
98
99
candidates = IRB ::InputCompletor ::CompletionProc . ( "'foo" , "require " , "" )
99
- assert_equal [ "'foo" ] , candidates
100
+ assert_include candidates , "'foo"
100
101
ensure
101
102
$LOAD_PATH. pop if test_path
102
103
FileUtils . remove_entry ( temp_dir ) if temp_dir
@@ -110,7 +111,7 @@ def test_complete_require_with_string_convertable_in_load_path
110
111
$LOAD_PATH << object
111
112
112
113
candidates = IRB ::InputCompletor ::CompletionProc . ( "'foo" , "require " , "" )
113
- assert_equal [ "'foo" ] , candidates
114
+ assert_include candidates , "'foo"
114
115
ensure
115
116
$LOAD_PATH. pop if object
116
117
FileUtils . remove_entry ( temp_dir ) if temp_dir
@@ -121,7 +122,9 @@ def test_complete_require_with_malformed_object_in_load_path
121
122
def object . to_s ; raise ; end
122
123
$LOAD_PATH << object
123
124
124
- assert_empty IRB ::InputCompletor ::CompletionProc . ( "'foo" , "require " , "" )
125
+ assert_nothing_raised do
126
+ IRB ::InputCompletor ::CompletionProc . ( "'foo" , "require " , "" )
127
+ end
125
128
ensure
126
129
$LOAD_PATH. pop if object
127
130
end
You can’t perform that action at this time.
0 commit comments