sixarm_ruby_minitest_equal_collection 1.3.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Rakefile +1 -0
- data/lib/sixarm_ruby_minitest_equal_collection.rb +1 -1
- data/lib/sixarm_ruby_minitest_equal_collection/minitest/assertions/equal_collection.rb +1 -1
- data/test/sixarm_ruby_minitest_equal_collection_test/minitest/assertions/equal_collection_test.rb +132 -44
- data/test/sixarm_ruby_minitest_equal_collection_test/minitest/expectations/equal_collection_test.rb +66 -32
- metadata +44 -70
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e21b4d37bf88c43ce48e9ed0c1ba0946e928ccefba9b44eec3d08b4d720982dc
|
4
|
+
data.tar.gz: 31dfb6ee0b70e7679843ea31433cdae165945809af186c73528c0e22c801b2f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69c7fd6bd2d37c6a1d1b6b0602c5abaeaa62815df6c62bc358698ddc2242996415514f46bf6fe601822258d7fb507a6c2563bc2c6a0b6366727c75d25060465f
|
7
|
+
data.tar.gz: 491cfc821cf7af057a5628257e0d2e30f25c7249f523138408c4088b00bb102b4885f3799a02d065857d2802d35f96d80a7cc9e5dc175ca150095d6a34e469c3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ end
|
|
12
12
|
|
13
13
|
MiniTest = Minitest unless defined?(MiniTest)
|
14
14
|
|
15
|
-
require '
|
15
|
+
require 'Hashdiff'
|
16
16
|
|
17
17
|
require 'sixarm_ruby_minitest_equal_collection/minitest/assertions/equal_collection'
|
18
18
|
require 'sixarm_ruby_minitest_equal_collection/minitest/expectations/equal_collection'
|
data/test/sixarm_ruby_minitest_equal_collection_test/minitest/assertions/equal_collection_test.rb
CHANGED
@@ -16,10 +16,14 @@ describe "Minitest" do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
specify "only one empty => fail" do
|
19
|
-
|
19
|
+
expect {
|
20
20
|
assert_equal_collection([], [:a])
|
21
21
|
}.must_raise MiniTest::Assertion
|
22
|
-
|
22
|
+
begin
|
23
|
+
assert_equal_collection([], [:a])
|
24
|
+
rescue MiniTest::Assertion => err
|
25
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
26
|
+
end
|
23
27
|
end
|
24
28
|
|
25
29
|
end
|
@@ -31,10 +35,14 @@ describe "Minitest" do
|
|
31
35
|
end
|
32
36
|
|
33
37
|
specify "with one empty => fail" do
|
34
|
-
|
38
|
+
expect {
|
35
39
|
assert_equal_collection({}, {a: 1})
|
36
40
|
}.must_raise MiniTest::Assertion
|
37
|
-
|
41
|
+
begin
|
42
|
+
assert_equal_collection({}, {a: 1})
|
43
|
+
rescue MiniTest::Assertion => err
|
44
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
45
|
+
end
|
38
46
|
end
|
39
47
|
|
40
48
|
end
|
@@ -50,10 +58,14 @@ describe "Minitest" do
|
|
50
58
|
end
|
51
59
|
|
52
60
|
specify "with unequal => fail" do
|
53
|
-
|
61
|
+
expect {
|
54
62
|
assert_equal_collection([:a], [:b])
|
55
63
|
}.must_raise MiniTest::Assertion
|
56
|
-
|
64
|
+
begin
|
65
|
+
assert_equal_collection([:a], [:b])
|
66
|
+
rescue MiniTest::Assertion => err
|
67
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
68
|
+
end
|
57
69
|
end
|
58
70
|
|
59
71
|
end
|
@@ -65,10 +77,14 @@ describe "Minitest" do
|
|
65
77
|
end
|
66
78
|
|
67
79
|
specify "with unequal => fail" do
|
68
|
-
|
80
|
+
expect {
|
69
81
|
assert_equal_collection({a: 1}, {b: 1})
|
70
82
|
}.must_raise MiniTest::Assertion
|
71
|
-
|
83
|
+
begin
|
84
|
+
assert_equal_collection({a: 1}, {b: 1})
|
85
|
+
rescue MiniTest::Assertion => err
|
86
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
87
|
+
end
|
72
88
|
end
|
73
89
|
|
74
90
|
end
|
@@ -84,10 +100,14 @@ describe "Minitest" do
|
|
84
100
|
end
|
85
101
|
|
86
102
|
specify "with unequal count => fail" do
|
87
|
-
|
103
|
+
expect {
|
88
104
|
assert_equal_collection([:a], [:a, :a])
|
89
105
|
}.must_raise MiniTest::Assertion
|
90
|
-
|
106
|
+
begin
|
107
|
+
assert_equal_collection([:a], [:a, :a])
|
108
|
+
rescue MiniTest::Assertion => err
|
109
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
110
|
+
end
|
91
111
|
end
|
92
112
|
|
93
113
|
end
|
@@ -99,10 +119,14 @@ describe "Minitest" do
|
|
99
119
|
end
|
100
120
|
|
101
121
|
specify "with unequal count => fail" do
|
102
|
-
|
122
|
+
expect {
|
103
123
|
assert_equal_collection({a: 1}, {a: 1, b: 1})
|
104
124
|
}.must_raise MiniTest::Assertion
|
105
|
-
|
125
|
+
begin
|
126
|
+
assert_equal_collection({a: 1}, {a: 1, b: 1})
|
127
|
+
rescue MiniTest::Assertion => err
|
128
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
129
|
+
end
|
106
130
|
end
|
107
131
|
|
108
132
|
end
|
@@ -142,10 +166,14 @@ describe "Minitest" do
|
|
142
166
|
describe "with actual nil" do
|
143
167
|
|
144
168
|
specify "raise" do
|
145
|
-
|
169
|
+
expect {
|
146
170
|
assert_equal_collection([], nil)
|
147
171
|
}.must_raise MiniTest::Assertion
|
148
|
-
|
172
|
+
begin
|
173
|
+
assert_equal_collection([], nil)
|
174
|
+
rescue MiniTest::Assertion => err
|
175
|
+
expect(err.message).must_match(/\bactual\b.*\bnil\b/)
|
176
|
+
end
|
149
177
|
end
|
150
178
|
|
151
179
|
end
|
@@ -153,10 +181,14 @@ describe "Minitest" do
|
|
153
181
|
describe "with expect nil" do
|
154
182
|
|
155
183
|
specify "raise" do
|
156
|
-
|
184
|
+
expect {
|
157
185
|
assert_equal_collection(nil, [])
|
158
186
|
}.must_raise MiniTest::Assertion
|
159
|
-
|
187
|
+
begin
|
188
|
+
assert_equal_collection(nil, [])
|
189
|
+
rescue MiniTest::Assertion => err
|
190
|
+
expect(err.message).must_match(/\bexpect\b.*\bnil\b/)
|
191
|
+
end
|
160
192
|
end
|
161
193
|
|
162
194
|
end
|
@@ -164,10 +196,14 @@ describe "Minitest" do
|
|
164
196
|
describe "with actual that does not respond to each" do
|
165
197
|
|
166
198
|
specify "raise" do
|
167
|
-
|
199
|
+
expect {
|
168
200
|
assert_equal_collection([], Object.new)
|
169
201
|
}.must_raise MiniTest::Assertion
|
170
|
-
|
202
|
+
begin
|
203
|
+
assert_equal_collection([], Object.new)
|
204
|
+
rescue MiniTest::Assertion => err
|
205
|
+
expect(err.message).must_match(/\bactual\b.*\brespond to each\b/)
|
206
|
+
end
|
171
207
|
end
|
172
208
|
|
173
209
|
end
|
@@ -175,10 +211,14 @@ describe "Minitest" do
|
|
175
211
|
describe "with expect that does not respond to each" do
|
176
212
|
|
177
213
|
specify "raise" do
|
178
|
-
|
214
|
+
expect {
|
179
215
|
assert_equal_collection(Object.new, [])
|
180
216
|
}.must_raise MiniTest::Assertion
|
181
|
-
|
217
|
+
begin
|
218
|
+
assert_equal_collection(Object.new, [])
|
219
|
+
rescue MiniTest::Assertion => err
|
220
|
+
expect(err.message).must_match(/\bexpect\b.*\brespond to each\b/)
|
221
|
+
end
|
182
222
|
end
|
183
223
|
|
184
224
|
end
|
@@ -194,10 +234,14 @@ describe "Minitest" do
|
|
194
234
|
describe "with array" do
|
195
235
|
|
196
236
|
specify "both empty => fail" do
|
197
|
-
|
237
|
+
expect {
|
198
238
|
refute_equal_collection([], [])
|
199
239
|
}.must_raise MiniTest::Assertion
|
200
|
-
|
240
|
+
begin
|
241
|
+
refute_equal_collection([], [])
|
242
|
+
rescue MiniTest::Assertion => err
|
243
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
244
|
+
end
|
201
245
|
end
|
202
246
|
|
203
247
|
specify "only one empty => pass" do
|
@@ -209,10 +253,14 @@ describe "Minitest" do
|
|
209
253
|
describe "with hash" do
|
210
254
|
|
211
255
|
specify "with both empty => fail" do
|
212
|
-
|
256
|
+
expect {
|
213
257
|
refute_equal_collection({}, {})
|
214
258
|
}.must_raise MiniTest::Assertion
|
215
|
-
|
259
|
+
begin
|
260
|
+
refute_equal_collection({}, {})
|
261
|
+
rescue MiniTest::Assertion => err
|
262
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
263
|
+
end
|
216
264
|
end
|
217
265
|
|
218
266
|
specify "with one empty => pass" do
|
@@ -228,10 +276,14 @@ describe "Minitest" do
|
|
228
276
|
describe "with array" do
|
229
277
|
|
230
278
|
specify "with equal => fail" do
|
231
|
-
|
279
|
+
expect {
|
232
280
|
refute_equal_collection([:a], [:a])
|
233
281
|
}.must_raise MiniTest::Assertion
|
234
|
-
|
282
|
+
begin
|
283
|
+
refute_equal_collection([:a], [:a])
|
284
|
+
rescue MiniTest::Assertion => err
|
285
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
286
|
+
end
|
235
287
|
end
|
236
288
|
|
237
289
|
specify "with unequal => succes" do
|
@@ -243,10 +295,14 @@ describe "Minitest" do
|
|
243
295
|
describe "with hash" do
|
244
296
|
|
245
297
|
specify "with equal => fail" do
|
246
|
-
|
298
|
+
expect {
|
247
299
|
refute_equal_collection({a: 1}, {a: 1})
|
248
300
|
}.must_raise MiniTest::Assertion
|
249
|
-
|
301
|
+
begin
|
302
|
+
refute_equal_collection({a: 1}, {a: 1})
|
303
|
+
rescue MiniTest::Assertion => err
|
304
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
305
|
+
end
|
250
306
|
end
|
251
307
|
|
252
308
|
specify "with unequal => pass" do
|
@@ -262,10 +318,14 @@ describe "Minitest" do
|
|
262
318
|
describe "with array" do
|
263
319
|
|
264
320
|
specify "with equal count => fail" do
|
265
|
-
|
321
|
+
expect {
|
266
322
|
refute_equal_collection([:a], [:a])
|
267
323
|
}.must_raise MiniTest::Assertion
|
268
|
-
|
324
|
+
begin
|
325
|
+
refute_equal_collection([:a], [:a])
|
326
|
+
rescue MiniTest::Assertion => err
|
327
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
328
|
+
end
|
269
329
|
end
|
270
330
|
|
271
331
|
specify "with unequal count => pass" do
|
@@ -277,10 +337,14 @@ describe "Minitest" do
|
|
277
337
|
describe "with hash" do
|
278
338
|
|
279
339
|
specify "with equal count => fail" do
|
280
|
-
|
340
|
+
expect {
|
281
341
|
refute_equal_collection({a: 1}, {a: 1})
|
282
342
|
}.must_raise MiniTest::Assertion
|
283
|
-
|
343
|
+
begin
|
344
|
+
refute_equal_collection({a: 1}, {a: 1})
|
345
|
+
rescue MiniTest::Assertion => err
|
346
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
347
|
+
end
|
284
348
|
end
|
285
349
|
|
286
350
|
specify "with unequal count => pass" do
|
@@ -296,17 +360,25 @@ describe "Minitest" do
|
|
296
360
|
describe "with array" do
|
297
361
|
|
298
362
|
specify "with same items and same order => fail" do
|
299
|
-
|
363
|
+
expect {
|
300
364
|
refute_equal_collection([:a, :b], [:a, :b])
|
301
365
|
}.must_raise MiniTest::Assertion
|
302
|
-
|
366
|
+
begin
|
367
|
+
refute_equal_collection([:a, :b], [:a, :b])
|
368
|
+
rescue MiniTest::Assertion => err
|
369
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
370
|
+
end
|
303
371
|
end
|
304
372
|
|
305
373
|
specify "with same items but different order => fail" do
|
306
|
-
|
374
|
+
expect {
|
307
375
|
refute_equal_collection([:a, :b], [:b, :a])
|
308
376
|
}.must_raise MiniTest::Assertion
|
309
|
-
|
377
|
+
begin
|
378
|
+
refute_equal_collection([:a, :b], [:b, :a])
|
379
|
+
rescue MiniTest::Assertion => err
|
380
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
381
|
+
end
|
310
382
|
end
|
311
383
|
|
312
384
|
end
|
@@ -314,17 +386,25 @@ describe "Minitest" do
|
|
314
386
|
describe "with hash" do
|
315
387
|
|
316
388
|
specify "with same items and same order => fail" do
|
317
|
-
|
389
|
+
expect {
|
318
390
|
refute_equal_collection({a: 1, b: 2}, {a: 1, b: 2})
|
319
391
|
}.must_raise MiniTest::Assertion
|
320
|
-
|
392
|
+
begin
|
393
|
+
refute_equal_collection({a: 1, b: 2}, {a: 1, b: 2})
|
394
|
+
rescue MiniTest::Assertion => err
|
395
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
396
|
+
end
|
321
397
|
end
|
322
398
|
|
323
399
|
specify "with same items and different order => fail" do
|
324
|
-
|
400
|
+
expect {
|
325
401
|
refute_equal_collection({a: 1, b: 2}, {b: 2, a: 1})
|
326
402
|
}.must_raise MiniTest::Assertion
|
327
|
-
|
403
|
+
begin
|
404
|
+
refute_equal_collection({a: 1, b: 2}, {b: 2, a: 1})
|
405
|
+
rescue MiniTest::Assertion => err
|
406
|
+
expect(err.message).must_match(/\bhave the same items\b/)
|
407
|
+
end
|
328
408
|
end
|
329
409
|
|
330
410
|
end
|
@@ -336,10 +416,14 @@ describe "Minitest" do
|
|
336
416
|
describe "with nil" do
|
337
417
|
|
338
418
|
specify "raise an error that explains nil" do
|
339
|
-
|
419
|
+
expect {
|
340
420
|
assert_equal_collection(nil, nil)
|
341
421
|
}.must_raise MiniTest::Assertion
|
342
|
-
|
422
|
+
begin
|
423
|
+
assert_equal_collection(nil, nil)
|
424
|
+
rescue MiniTest::Assertion => err
|
425
|
+
expect(err.message).must_match(/\bgot nil\b/)
|
426
|
+
end
|
343
427
|
end
|
344
428
|
|
345
429
|
end
|
@@ -347,10 +431,14 @@ describe "Minitest" do
|
|
347
431
|
describe "with an object that does not respond to each" do
|
348
432
|
|
349
433
|
specify "raise an error that explains respond to each" do
|
350
|
-
|
434
|
+
expect {
|
351
435
|
assert_equal_collection(Object.new, Object.new)
|
352
436
|
}.must_raise MiniTest::Assertion
|
353
|
-
|
437
|
+
begin
|
438
|
+
assert_equal_collection(Object.new, Object.new)
|
439
|
+
rescue MiniTest::Assertion => err
|
440
|
+
expect(err.message).must_match(/\brespond to each\b/)
|
441
|
+
end
|
354
442
|
end
|
355
443
|
|
356
444
|
end
|
data/test/sixarm_ruby_minitest_equal_collection_test/minitest/expectations/equal_collection_test.rb
CHANGED
@@ -16,7 +16,7 @@ describe "Minitest" do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
specify "only one empty => fail" do
|
19
|
-
|
19
|
+
expect {
|
20
20
|
expect([]).must_equal_collection [:a]
|
21
21
|
}.must_raise MiniTest::Assertion
|
22
22
|
end
|
@@ -30,7 +30,7 @@ describe "Minitest" do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
specify "with one empty => fail" do
|
33
|
-
|
33
|
+
expect {
|
34
34
|
expect({}).must_equal_collection({a: 1})
|
35
35
|
}.must_raise MiniTest::Assertion
|
36
36
|
end
|
@@ -48,7 +48,7 @@ describe "Minitest" do
|
|
48
48
|
end
|
49
49
|
|
50
50
|
specify "with unequal => fail" do
|
51
|
-
|
51
|
+
expect {
|
52
52
|
expect([:a]).must_equal_collection [:b]
|
53
53
|
}.must_raise MiniTest::Assertion
|
54
54
|
end
|
@@ -62,7 +62,7 @@ describe "Minitest" do
|
|
62
62
|
end
|
63
63
|
|
64
64
|
specify "with unequal => fail" do
|
65
|
-
|
65
|
+
expect {
|
66
66
|
expect({a: 1}).must_equal_collection({b: 1})
|
67
67
|
}.must_raise MiniTest::Assertion
|
68
68
|
end
|
@@ -80,7 +80,7 @@ describe "Minitest" do
|
|
80
80
|
end
|
81
81
|
|
82
82
|
specify "with unequal count => fail" do
|
83
|
-
|
83
|
+
expect {
|
84
84
|
expect([:a]).must_equal_collection [:a, :a]
|
85
85
|
}.must_raise MiniTest::Assertion
|
86
86
|
end
|
@@ -94,7 +94,7 @@ describe "Minitest" do
|
|
94
94
|
end
|
95
95
|
|
96
96
|
specify "with unequal count => fail" do
|
97
|
-
|
97
|
+
expect {
|
98
98
|
expect({a: 1}).must_equal_collection({a: 1, b: 1})
|
99
99
|
}.must_raise MiniTest::Assertion
|
100
100
|
end
|
@@ -136,10 +136,14 @@ describe "Minitest" do
|
|
136
136
|
describe "with `actual` nil" do
|
137
137
|
|
138
138
|
specify "raise" do
|
139
|
-
|
139
|
+
expect {
|
140
140
|
expect(nil).must_equal_collection []
|
141
141
|
}.must_raise MiniTest::Assertion
|
142
|
-
|
142
|
+
begin
|
143
|
+
expect(nil).must_equal_collection []
|
144
|
+
rescue MiniTest::Assertion => err
|
145
|
+
expect(err.message).must_match(/\bactual\b.*\bnil\b/)
|
146
|
+
end
|
143
147
|
end
|
144
148
|
|
145
149
|
end
|
@@ -147,10 +151,15 @@ describe "Minitest" do
|
|
147
151
|
describe "with `expect` nil" do
|
148
152
|
|
149
153
|
specify "raise" do
|
150
|
-
|
154
|
+
expect {
|
151
155
|
expect([]).must_equal_collection nil
|
152
156
|
}.must_raise MiniTest::Assertion
|
153
|
-
|
157
|
+
#TODO
|
158
|
+
begin
|
159
|
+
expect([]).must_equal_collection nil
|
160
|
+
rescue MiniTest::Assertion => err
|
161
|
+
expect(err.message).must_match(/\bexpect\b.*\bnil\b/)
|
162
|
+
end
|
154
163
|
end
|
155
164
|
|
156
165
|
end
|
@@ -158,10 +167,15 @@ describe "Minitest" do
|
|
158
167
|
describe "with `actual` that does not respond to each" do
|
159
168
|
|
160
169
|
specify "raise" do
|
161
|
-
|
170
|
+
expect {
|
162
171
|
expect(Object.new).must_equal_collection []
|
163
172
|
}.must_raise MiniTest::Assertion
|
164
|
-
|
173
|
+
#TODO
|
174
|
+
begin
|
175
|
+
expect(Object.new).must_equal_collection []
|
176
|
+
rescue MiniTest::Assertion => err
|
177
|
+
expect(err.message).must_match(/\bactual\b.*\brespond to each\b/)
|
178
|
+
end
|
165
179
|
end
|
166
180
|
|
167
181
|
end
|
@@ -169,10 +183,14 @@ describe "Minitest" do
|
|
169
183
|
describe "with `expect` that does not respond to each" do
|
170
184
|
|
171
185
|
specify "raise" do
|
172
|
-
|
186
|
+
expect {
|
173
187
|
expect([]).must_equal_collection Object.new
|
174
188
|
}.must_raise MiniTest::Assertion
|
175
|
-
|
189
|
+
begin
|
190
|
+
expect([]).must_equal_collection Object.new
|
191
|
+
rescue MiniTest::Assertion => err
|
192
|
+
expect(err.message).must_match(/\bexpect\b.*\brespond to each\b/)
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
end
|
@@ -188,7 +206,7 @@ describe "Minitest" do
|
|
188
206
|
describe "with array" do
|
189
207
|
|
190
208
|
specify "both empty => fail" do
|
191
|
-
|
209
|
+
expect {
|
192
210
|
expect([]).wont_equal_collection []
|
193
211
|
}.must_raise MiniTest::Assertion
|
194
212
|
end
|
@@ -202,7 +220,7 @@ describe "Minitest" do
|
|
202
220
|
describe "with hash" do
|
203
221
|
|
204
222
|
specify "with both empty => fail" do
|
205
|
-
|
223
|
+
expect {
|
206
224
|
expect({}).wont_equal_collection({})
|
207
225
|
}.must_raise MiniTest::Assertion
|
208
226
|
end
|
@@ -220,7 +238,7 @@ describe "Minitest" do
|
|
220
238
|
describe "with array" do
|
221
239
|
|
222
240
|
specify "with equal => fail" do
|
223
|
-
|
241
|
+
expect {
|
224
242
|
expect([:a]).wont_equal_collection [:a]
|
225
243
|
}.must_raise MiniTest::Assertion
|
226
244
|
end
|
@@ -234,7 +252,7 @@ describe "Minitest" do
|
|
234
252
|
describe "with hash" do
|
235
253
|
|
236
254
|
specify "with equal => fail" do
|
237
|
-
|
255
|
+
expect {
|
238
256
|
expect({a: 1}).wont_equal_collection({a: 1})
|
239
257
|
}.must_raise MiniTest::Assertion
|
240
258
|
end
|
@@ -252,7 +270,7 @@ describe "Minitest" do
|
|
252
270
|
describe "with array" do
|
253
271
|
|
254
272
|
specify "with equal count => fail" do
|
255
|
-
|
273
|
+
expect {
|
256
274
|
expect([:a]).wont_equal_collection [:a]
|
257
275
|
}.must_raise MiniTest::Assertion
|
258
276
|
end
|
@@ -266,7 +284,7 @@ describe "Minitest" do
|
|
266
284
|
describe "with hash" do
|
267
285
|
|
268
286
|
specify "with equal count => fail" do
|
269
|
-
|
287
|
+
expect {
|
270
288
|
expect({a: 1}).wont_equal_collection({a: 1})
|
271
289
|
}.must_raise MiniTest::Assertion
|
272
290
|
end
|
@@ -284,13 +302,13 @@ describe "Minitest" do
|
|
284
302
|
describe "with array" do
|
285
303
|
|
286
304
|
specify "with same items and same order => fail" do
|
287
|
-
|
305
|
+
expect {
|
288
306
|
expect([:a, :b]).wont_equal_collection [:a, :b]
|
289
307
|
}.must_raise MiniTest::Assertion
|
290
308
|
end
|
291
309
|
|
292
310
|
specify "with same items but different order => fail" do
|
293
|
-
|
311
|
+
expect {
|
294
312
|
expect([:a, :b]).wont_equal_collection [:b, :a]
|
295
313
|
}.must_raise MiniTest::Assertion
|
296
314
|
end
|
@@ -300,13 +318,13 @@ describe "Minitest" do
|
|
300
318
|
describe "with hash" do
|
301
319
|
|
302
320
|
specify "with same items and same order => fail" do
|
303
|
-
|
321
|
+
expect {
|
304
322
|
expect({a: 1, b: 2}).wont_equal_collection({a: 1, b: 2})
|
305
323
|
}.must_raise MiniTest::Assertion
|
306
324
|
end
|
307
325
|
|
308
326
|
specify "with same items and different order => fail" do
|
309
|
-
|
327
|
+
expect {
|
310
328
|
expect({a: 1, b: 2}).wont_equal_collection({b: 2, a: 1})
|
311
329
|
}.must_raise MiniTest::Assertion
|
312
330
|
end
|
@@ -320,10 +338,14 @@ describe "Minitest" do
|
|
320
338
|
describe "with `actual` nil" do
|
321
339
|
|
322
340
|
specify "raise" do
|
323
|
-
|
341
|
+
expect {
|
324
342
|
expect(nil).wont_equal_collection []
|
325
343
|
}.must_raise MiniTest::Assertion
|
326
|
-
|
344
|
+
begin
|
345
|
+
expect(nil).wont_equal_collection []
|
346
|
+
rescue MiniTest::Assertion => err
|
347
|
+
expect(err.message).must_match(/\bactual\b.*\bnil\b/)
|
348
|
+
end
|
327
349
|
end
|
328
350
|
|
329
351
|
end
|
@@ -331,10 +353,14 @@ describe "Minitest" do
|
|
331
353
|
describe "with `expect` nil" do
|
332
354
|
|
333
355
|
specify "raise" do
|
334
|
-
|
356
|
+
expect {
|
335
357
|
expect([]).wont_equal_collection nil
|
336
358
|
}.must_raise MiniTest::Assertion
|
337
|
-
|
359
|
+
begin
|
360
|
+
expect([]).wont_equal_collection nil
|
361
|
+
rescue MiniTest::Assertion => err
|
362
|
+
expect(err.message).must_match(/\bexpect\b.*\bnil\b/)
|
363
|
+
end
|
338
364
|
end
|
339
365
|
|
340
366
|
end
|
@@ -342,10 +368,14 @@ describe "Minitest" do
|
|
342
368
|
describe "with `actual` that does not respond to each" do
|
343
369
|
|
344
370
|
specify "raise" do
|
345
|
-
|
371
|
+
expect {
|
346
372
|
expect(Object.new).wont_equal_collection []
|
347
373
|
}.must_raise MiniTest::Assertion
|
348
|
-
|
374
|
+
begin
|
375
|
+
expect(Object.new).wont_equal_collection []
|
376
|
+
rescue MiniTest::Assertion => err
|
377
|
+
expect(err.message).must_match(/\bactual\b.*\brespond to each\b/)
|
378
|
+
end
|
349
379
|
end
|
350
380
|
|
351
381
|
end
|
@@ -353,10 +383,14 @@ describe "Minitest" do
|
|
353
383
|
describe "with `expect` that does not respond to each" do
|
354
384
|
|
355
385
|
specify "raise" do
|
356
|
-
|
386
|
+
expect {
|
357
387
|
expect([]).wont_equal_collection Object.new
|
358
388
|
}.must_raise MiniTest::Assertion
|
359
|
-
|
389
|
+
begin
|
390
|
+
expect([]).wont_equal_collection Object.new
|
391
|
+
rescue MiniTest::Assertion => err
|
392
|
+
expect(err.message).must_match(/\bexpect\b.*\brespond to each\b/)
|
393
|
+
end
|
360
394
|
end
|
361
395
|
|
362
396
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sixarm_ruby_minitest_equal_collection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SixArm
|
@@ -10,41 +10,36 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
Drcxp/zlVhud+a0ezdnyNvF520arJWvqA4GrOo8F+TT2vVrjscgYjiVGdSq+8wQv
|
42
|
-
Efa5jhe8QwG7R1rdpMMP5yBSAqWuFBczMveX5j4rp9Ifw5/XsZbgwcmdm26bjhzh
|
43
|
-
w2grAHIhvR9mztm6uXQlZhv1fu3P+RWHDSYhnZSCJSCdxPzQJ1mG5T5ahiL3HvCZ
|
44
|
-
2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
|
45
|
-
n+ES/gQPOnvmVkLDGw==
|
13
|
+
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
|
46
41
|
-----END CERTIFICATE-----
|
47
|
-
date:
|
42
|
+
date: 2019-10-02 00:00:00.000000000 Z
|
48
43
|
dependencies:
|
49
44
|
- !ruby/object:Gem::Dependency
|
50
45
|
name: hashdiff
|
@@ -52,7 +47,7 @@ dependencies:
|
|
52
47
|
requirements:
|
53
48
|
- - ">="
|
54
49
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
50
|
+
version: 1.0.0
|
56
51
|
- - "<"
|
57
52
|
- !ruby/object:Gem::Version
|
58
53
|
version: '2'
|
@@ -62,37 +57,17 @@ dependencies:
|
|
62
57
|
requirements:
|
63
58
|
- - ">="
|
64
59
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
60
|
+
version: 1.0.0
|
66
61
|
- - "<"
|
67
62
|
- !ruby/object:Gem::Version
|
68
63
|
version: '2'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 12.2.1
|
76
|
-
- - "<"
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: '13'
|
79
|
-
type: :development
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: !ruby/object:Gem::Requirement
|
82
|
-
requirements:
|
83
|
-
- - ">="
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: 12.2.1
|
86
|
-
- - "<"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '13'
|
89
64
|
- !ruby/object:Gem::Dependency
|
90
65
|
name: minitest
|
91
66
|
requirement: !ruby/object:Gem::Requirement
|
92
67
|
requirements:
|
93
68
|
- - ">="
|
94
69
|
- !ruby/object:Gem::Version
|
95
|
-
version: 5.
|
70
|
+
version: 5.11.1
|
96
71
|
- - "<"
|
97
72
|
- !ruby/object:Gem::Version
|
98
73
|
version: '6'
|
@@ -102,30 +77,30 @@ dependencies:
|
|
102
77
|
requirements:
|
103
78
|
- - ">="
|
104
79
|
- !ruby/object:Gem::Version
|
105
|
-
version: 5.
|
80
|
+
version: 5.11.1
|
106
81
|
- - "<"
|
107
82
|
- !ruby/object:Gem::Version
|
108
83
|
version: '6'
|
109
84
|
- !ruby/object:Gem::Dependency
|
110
|
-
name:
|
85
|
+
name: rake
|
111
86
|
requirement: !ruby/object:Gem::Requirement
|
112
87
|
requirements:
|
113
88
|
- - ">="
|
114
89
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
90
|
+
version: 12.3.0
|
116
91
|
- - "<"
|
117
92
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
93
|
+
version: '13'
|
119
94
|
type: :development
|
120
95
|
prerelease: false
|
121
96
|
version_requirements: !ruby/object:Gem::Requirement
|
122
97
|
requirements:
|
123
98
|
- - ">="
|
124
99
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
100
|
+
version: 12.3.0
|
126
101
|
- - "<"
|
127
102
|
- !ruby/object:Gem::Version
|
128
|
-
version: '
|
103
|
+
version: '13'
|
129
104
|
- !ruby/object:Gem::Dependency
|
130
105
|
name: simplecov
|
131
106
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,12 +122,12 @@ dependencies:
|
|
147
122
|
- !ruby/object:Gem::Version
|
148
123
|
version: '2'
|
149
124
|
- !ruby/object:Gem::Dependency
|
150
|
-
name:
|
125
|
+
name: yard
|
151
126
|
requirement: !ruby/object:Gem::Requirement
|
152
127
|
requirements:
|
153
128
|
- - ">="
|
154
129
|
- !ruby/object:Gem::Version
|
155
|
-
version: 0.
|
130
|
+
version: 0.9.20
|
156
131
|
- - "<"
|
157
132
|
- !ruby/object:Gem::Version
|
158
133
|
version: '2'
|
@@ -162,7 +137,7 @@ dependencies:
|
|
162
137
|
requirements:
|
163
138
|
- - ">="
|
164
139
|
- !ruby/object:Gem::Version
|
165
|
-
version: 0.
|
140
|
+
version: 0.9.20
|
166
141
|
- - "<"
|
167
142
|
- !ruby/object:Gem::Version
|
168
143
|
version: '2'
|
@@ -197,15 +172,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
172
|
requirements:
|
198
173
|
- - ">="
|
199
174
|
- !ruby/object:Gem::Version
|
200
|
-
version: '
|
175
|
+
version: '2.5'
|
201
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
177
|
requirements:
|
203
178
|
- - ">="
|
204
179
|
- !ruby/object:Gem::Version
|
205
180
|
version: '0'
|
206
181
|
requirements: []
|
207
|
-
|
208
|
-
rubygems_version: 2.6.13
|
182
|
+
rubygems_version: 3.0.6
|
209
183
|
signing_key:
|
210
184
|
specification_version: 4
|
211
185
|
summary: SixArm.com → Ruby → Minitest → equal_collection assertion & extension
|
metadata.gz.sig
CHANGED
Binary file
|