This repository was archived by the owner on Mar 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -148,14 +148,16 @@ def test_can_iterate_over_all_entries
148
148
def test_size
149
149
Ref ::Mock . use do
150
150
hash = map_class . new
151
- assert_true hash . empty?
151
+ assert hash . empty?
152
152
assert_equal 0 , hash . size
153
+ key_1 = Object . new
153
154
key_2 = Object . new
154
155
hash [ key_1 ] = "value 1"
155
- assert_false hash . empty?
156
+ hash [ key_2 ] = "value 2"
157
+ refute hash . empty?
156
158
assert_equal 2 , hash . size
157
159
Ref ::Mock . gc ( key_2 )
158
- assert_false hash . empty?
160
+ refute hash . empty?
159
161
assert_equal 1 , hash . size
160
162
end
161
163
end
Original file line number Diff line number Diff line change @@ -128,16 +128,16 @@ def test_can_iterate_over_all_entries
128
128
def test_size
129
129
Ref ::Mock . use do
130
130
hash = map_class . new
131
- assert_true hash . empty?
131
+ assert hash . empty?
132
132
assert_equal 0 , hash . size
133
133
value_1 = "value 1"
134
134
value_2 = "value 2"
135
135
hash [ "key 1" ] = value_1
136
136
hash [ "key 2" ] = value_2
137
- assert_false hash . empty?
137
+ refute hash . empty?
138
138
assert_equal 2 , hash . size
139
139
Ref ::Mock . gc ( value_2 )
140
- assert_false hash . empty?
140
+ refute hash . empty?
141
141
assert_equal 1 , hash . size
142
142
end
143
143
end
You can’t perform that action at this time.
0 commit comments