super_diff 0.5.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +46 -19
  3. data/lib/super_diff.rb +1 -7
  4. data/lib/super_diff/colorized_document_extensions.rb +4 -4
  5. data/lib/super_diff/configuration.rb +32 -22
  6. data/lib/super_diff/csi.rb +2 -1
  7. data/lib/super_diff/diff_formatters/collection.rb +1 -1
  8. data/lib/super_diff/diff_formatters/multiline_string.rb +4 -4
  9. data/lib/super_diff/equality_matchers/array.rb +2 -2
  10. data/lib/super_diff/equality_matchers/default.rb +2 -2
  11. data/lib/super_diff/equality_matchers/hash.rb +2 -2
  12. data/lib/super_diff/equality_matchers/multiline_string.rb +2 -2
  13. data/lib/super_diff/equality_matchers/primitive.rb +2 -2
  14. data/lib/super_diff/equality_matchers/singleline_string.rb +2 -2
  15. data/lib/super_diff/gem_version.rb +45 -0
  16. data/lib/super_diff/rspec.rb +4 -0
  17. data/lib/super_diff/rspec/matcher_text_builders/base.rb +7 -7
  18. data/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb +6 -6
  19. data/lib/super_diff/rspec/matcher_text_builders/contain_exactly.rb +1 -1
  20. data/lib/super_diff/rspec/matcher_text_builders/have_predicate.rb +4 -4
  21. data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +1 -1
  22. data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +5 -5
  23. data/lib/super_diff/rspec/monkey_patches.rb +22 -13
  24. data/lib/super_diff/rspec/operation_tree_builders/collection_containing_exactly.rb +12 -1
  25. data/lib/super_diff/version.rb +1 -1
  26. data/spec/examples.txt +393 -5
  27. data/spec/integration/rspec/be_falsey_matcher_spec.rb +10 -10
  28. data/spec/integration/rspec/be_matcher_spec.rb +100 -100
  29. data/spec/integration/rspec/be_nil_matcher_spec.rb +10 -10
  30. data/spec/integration/rspec/be_predicate_matcher_spec.rb +103 -103
  31. data/spec/integration/rspec/be_truthy_matcher_spec.rb +10 -10
  32. data/spec/integration/rspec/contain_exactly_matcher_spec.rb +107 -107
  33. data/spec/integration/rspec/eq_matcher_spec.rb +230 -230
  34. data/spec/integration/rspec/have_attributes_matcher_spec.rb +129 -129
  35. data/spec/integration/rspec/have_predicate_matcher_spec.rb +65 -65
  36. data/spec/integration/rspec/include_matcher_spec.rb +73 -73
  37. data/spec/integration/rspec/match_array_matcher_spec.rb +119 -119
  38. data/spec/integration/rspec/match_matcher_spec.rb +274 -274
  39. data/spec/integration/rspec/raise_error_matcher_spec.rb +86 -86
  40. data/spec/integration/rspec/respond_to_matcher_spec.rb +240 -240
  41. data/spec/integration/rspec/third_party_matcher_spec.rb +8 -8
  42. data/spec/integration/rspec/unhandled_errors_spec.rb +5 -5
  43. data/spec/spec_helper.rb +22 -13
  44. data/spec/support/integration/helpers.rb +6 -2
  45. data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +1 -1
  46. data/spec/support/integration/test_programs/base.rb +2 -0
  47. data/spec/support/integration/test_programs/rspec_active_record.rb +1 -1
  48. data/spec/support/integration/test_programs/rspec_active_support.rb +17 -0
  49. data/spec/support/integration/test_programs/rspec_rails.rb +1 -1
  50. data/spec/support/shared_examples/active_record.rb +108 -108
  51. data/spec/support/shared_examples/hash_with_indifferent_access.rb +196 -232
  52. data/spec/tmp/integration_spec.rb +15 -0
  53. data/spec/unit/equality_matchers/main_spec.rb +403 -403
  54. data/super_diff.gemspec +1 -1
  55. metadata +11 -3
@@ -20,11 +20,11 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
20
20
  snippet: %|expect { raise StandardError.new('boo') }.to raise_error(RuntimeError)|,
21
21
  expectation: proc {
22
22
  line do
23
- plain "Expected raised exception "
24
- beta %|#<StandardError "boo">|
25
- plain " to match "
26
- alpha %|#<RuntimeError>|
27
- plain "."
23
+ plain %|Expected raised exception |
24
+ actual %|#<StandardError "boo">|
25
+ plain %| to match |
26
+ expected %|#<RuntimeError>|
27
+ plain %|.|
28
28
  end
29
29
  },
30
30
  )
@@ -53,13 +53,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
53
53
  newline_before_expectation: true,
54
54
  expectation: proc {
55
55
  line do
56
- plain "Expected raised exception "
57
- beta %|#<StandardError "this is a super super super long message">|
56
+ plain %|Expected raised exception |
57
+ actual %|#<StandardError "this is a super super super long message">|
58
58
  end
59
59
 
60
60
  line do
61
- plain " to match "
62
- alpha %|#<RuntimeError>|
61
+ plain %| to match |
62
+ expected %|#<RuntimeError>|
63
63
  end
64
64
  },
65
65
  )
@@ -88,9 +88,9 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
88
88
  snippet: %|expect { }.to raise_error(RuntimeError)|,
89
89
  expectation: proc {
90
90
  line do
91
- plain "Expected block to raise error "
92
- alpha %|#<RuntimeError>|
93
- plain "."
91
+ plain %|Expected block to raise error |
92
+ expected %|#<RuntimeError>|
93
+ plain %|.|
94
94
  end
95
95
  },
96
96
  )
@@ -120,11 +120,11 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
120
120
  snippet: %|expect { raise StandardError.new('boo') }.not_to raise_error(StandardError)|,
121
121
  expectation: proc {
122
122
  line do
123
- plain "Expected raised exception "
124
- beta %|#<StandardError "boo">|
125
- plain " not to match "
126
- alpha %|#<StandardError>|
127
- plain "."
123
+ plain %|Expected raised exception |
124
+ actual %|#<StandardError "boo">|
125
+ plain %| not to match |
126
+ expected %|#<StandardError>|
127
+ plain %|.|
128
128
  end
129
129
  },
130
130
  )
@@ -153,13 +153,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
153
153
  newline_before_expectation: true,
154
154
  expectation: proc {
155
155
  line do
156
- plain "Expected raised exception "
157
- beta %|#<StandardError "this is a super super long message">|
156
+ plain %|Expected raised exception |
157
+ actual %|#<StandardError "this is a super super long message">|
158
158
  end
159
159
 
160
160
  line do
161
- plain " not to match "
162
- alpha %|#<StandardError>|
161
+ plain %| not to match |
162
+ expected %|#<StandardError>|
163
163
  end
164
164
  },
165
165
  )
@@ -192,11 +192,11 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
192
192
  snippet: %|expect { raise 'boo' }.to raise_error('hell')|,
193
193
  expectation: proc {
194
194
  line do
195
- plain "Expected raised exception "
196
- beta %|#<RuntimeError "boo">|
197
- plain " to match "
198
- alpha %|#<Exception "hell">|
199
- plain "."
195
+ plain %|Expected raised exception |
196
+ actual %|#<RuntimeError "boo">|
197
+ plain %| to match |
198
+ expected %|#<Exception "hell">|
199
+ plain %|.|
200
200
  end
201
201
  },
202
202
  )
@@ -228,13 +228,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
228
228
  newline_before_expectation: true,
229
229
  expectation: proc {
230
230
  line do
231
- plain "Expected raised exception "
232
- beta %|#<RuntimeError "some really really really long message">|
231
+ plain %|Expected raised exception |
232
+ actual %|#<RuntimeError "some really really really long message">|
233
233
  end
234
234
 
235
235
  line do
236
- plain " to match "
237
- alpha %|#<Exception "whatever">|
236
+ plain %| to match |
237
+ expected %|#<Exception "whatever">|
238
238
  end
239
239
  },
240
240
  )
@@ -270,19 +270,19 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
270
270
  snippet: %|expect { raise(actual_message) }.to raise_error(expected_message)|,
271
271
  expectation: proc {
272
272
  line do
273
- plain "Expected raised exception "
274
- beta %|#<RuntimeError "This is fun\\nSo is this">|
273
+ plain %|Expected raised exception |
274
+ actual %|#<RuntimeError "This is fun\\nSo is this">|
275
275
  end
276
276
 
277
277
  line do
278
- plain " to match "
279
- alpha %|#<Exception "This is fun\\nAnd so is this">|
278
+ plain %| to match |
279
+ expected %|#<Exception "This is fun\\nAnd so is this">|
280
280
  end
281
281
  },
282
282
  diff: proc {
283
- plain_line %| This is fun\\n|
284
- alpha_line %|- And so is this|
285
- beta_line %|+ So is this|
283
+ plain_line %| This is fun\\n|
284
+ expected_line %|- And so is this|
285
+ actual_line %|+ So is this|
286
286
  },
287
287
  )
288
288
 
@@ -312,9 +312,9 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
312
312
  snippet: %|expect { }.to raise_error('hell')|,
313
313
  expectation: proc {
314
314
  line do
315
- plain "Expected block to raise error "
316
- alpha %|#<Exception "hell">|
317
- plain "."
315
+ plain %|Expected block to raise error |
316
+ expected %|#<Exception "hell">|
317
+ plain %|.|
318
318
  end
319
319
  },
320
320
  )
@@ -345,13 +345,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
345
345
  newline_before_expectation: true,
346
346
  expectation: proc {
347
347
  line do
348
- plain " Expected "
349
- plain "block"
348
+ plain %| Expected |
349
+ plain %|block|
350
350
  end
351
351
 
352
352
  line do
353
- plain "to raise error "
354
- alpha %|#<Exception "this is a super super super super super super long message">|
353
+ plain %|to raise error |
354
+ expected %|#<Exception "this is a super super super super super super long message">|
355
355
  end
356
356
  },
357
357
  )
@@ -381,13 +381,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
381
381
  newline_before_expectation: true,
382
382
  expectation: proc {
383
383
  line do
384
- plain "Expected raised exception "
385
- beta %|#<RuntimeError "some really long message">|
384
+ plain %|Expected raised exception |
385
+ actual %|#<RuntimeError "some really long message">|
386
386
  end
387
387
 
388
388
  line do
389
- plain " not to match "
390
- alpha %|#<Exception "some really long message">|
389
+ plain %| not to match |
390
+ expected %|#<Exception "some really long message">|
391
391
  end
392
392
  },
393
393
  )
@@ -419,11 +419,11 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
419
419
  snippet: %|expect { raise 'boo' }.not_to raise_error('boo')|,
420
420
  expectation: proc {
421
421
  line do
422
- plain "Expected raised exception "
423
- beta %|#<RuntimeError "boo">|
424
- plain " not to match "
425
- alpha %|#<Exception "boo">|
426
- plain "."
422
+ plain %|Expected raised exception |
423
+ actual %|#<RuntimeError "boo">|
424
+ plain %| not to match |
425
+ expected %|#<Exception "boo">|
426
+ plain %|.|
427
427
  end
428
428
  },
429
429
  )
@@ -454,13 +454,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
454
454
  newline_before_expectation: true,
455
455
  expectation: proc {
456
456
  line do
457
- plain "Expected raised exception "
458
- beta %|#<RuntimeError "some really long message">|
457
+ plain %|Expected raised exception |
458
+ actual %|#<RuntimeError "some really long message">|
459
459
  end
460
460
 
461
461
  line do
462
- plain " not to match "
463
- alpha %|#<Exception "some really long message">|
462
+ plain %| not to match |
463
+ expected %|#<Exception "some really long message">|
464
464
  end
465
465
  },
466
466
  )
@@ -493,13 +493,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
493
493
  newline_before_expectation: true,
494
494
  expectation: proc {
495
495
  line do
496
- plain "Expected raised exception "
497
- beta %|#<RuntimeError "This is fun\\nSo is this">|
496
+ plain %|Expected raised exception |
497
+ actual %|#<RuntimeError "This is fun\\nSo is this">|
498
498
  end
499
499
 
500
500
  line do
501
- plain " not to match "
502
- alpha %|#<Exception "This is fun\\nSo is this">|
501
+ plain %| not to match |
502
+ expected %|#<Exception "This is fun\\nSo is this">|
503
503
  end
504
504
  },
505
505
  )
@@ -534,11 +534,11 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
534
534
  snippet: %|expect(&block).to raise_error(RuntimeError, 'b')|,
535
535
  expectation: proc {
536
536
  line do
537
- plain "Expected raised exception "
538
- beta %|#<StandardError "a">|
539
- plain " to match "
540
- alpha %|#<RuntimeError "b">|
541
- plain "."
537
+ plain %|Expected raised exception |
538
+ actual %|#<StandardError "a">|
539
+ plain %| to match |
540
+ expected %|#<RuntimeError "b">|
541
+ plain %|.|
542
542
  end
543
543
  },
544
544
  )
@@ -568,13 +568,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
568
568
  newline_before_expectation: true,
569
569
  expectation: proc {
570
570
  line do
571
- plain "Expected raised exception "
572
- beta %|#<StandardError "this is a long message">|
571
+ plain %|Expected raised exception |
572
+ actual %|#<StandardError "this is a long message">|
573
573
  end
574
574
 
575
575
  line do
576
- plain " to match "
577
- alpha %|#<RuntimeError "this is another long message">|
576
+ plain %| to match |
577
+ expected %|#<RuntimeError "this is another long message">|
578
578
  end
579
579
  },
580
580
  )
@@ -604,9 +604,9 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
604
604
  snippet: %|expect { }.to raise_error(RuntimeError, 'b')|,
605
605
  expectation: proc {
606
606
  line do
607
- plain "Expected block to raise error "
608
- alpha %|#<RuntimeError "b">|
609
- plain "."
607
+ plain %|Expected block to raise error |
608
+ expected %|#<RuntimeError "b">|
609
+ plain %|.|
610
610
  end
611
611
  },
612
612
  )
@@ -635,13 +635,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
635
635
  newline_before_expectation: true,
636
636
  expectation: proc {
637
637
  line do
638
- plain " Expected "
639
- plain "block"
638
+ plain %| Expected |
639
+ plain %|block|
640
640
  end
641
641
 
642
642
  line do
643
- plain "to raise error "
644
- alpha %|#<RuntimeError "this is a super super super super super super long message">|
643
+ plain %|to raise error |
644
+ expected %|#<RuntimeError "this is a super super super super super super long message">|
645
645
  end
646
646
  },
647
647
  )
@@ -673,11 +673,11 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
673
673
  snippet: %|expect(&block).not_to raise_error(StandardError, 'a')|,
674
674
  expectation: proc {
675
675
  line do
676
- plain "Expected raised exception "
677
- beta %|#<StandardError "a">|
678
- plain " not to match "
679
- alpha %|#<StandardError "a">|
680
- plain "."
676
+ plain %|Expected raised exception |
677
+ actual %|#<StandardError "a">|
678
+ plain %| not to match |
679
+ expected %|#<StandardError "a">|
680
+ plain %|.|
681
681
  end
682
682
  },
683
683
  )
@@ -707,13 +707,13 @@ RSpec.describe "Integration with RSpec's #raise_error matcher", type: :integrati
707
707
  newline_before_expectation: true,
708
708
  expectation: proc {
709
709
  line do
710
- plain "Expected raised exception "
711
- beta %|#<StandardError "this is a long message">|
710
+ plain %|Expected raised exception |
711
+ actual %|#<StandardError "this is a long message">|
712
712
  end
713
713
 
714
714
  line do
715
- plain " not to match "
716
- alpha %|#<StandardError "this is a long message">|
715
+ plain %| not to match |
716
+ expected %|#<StandardError "this is a long message">|
717
717
  end
718
718
  },
719
719
  )
@@ -17,11 +17,11 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
17
17
  snippet: snippet,
18
18
  expectation: proc {
19
19
  line do
20
- plain "Expected "
21
- beta %|#<Double (anonymous)>|
22
- plain " to respond to "
23
- alpha %|:foo|
24
- plain "."
20
+ plain %|Expected |
21
+ actual %|#<Double (anonymous)>|
22
+ plain %| to respond to |
23
+ expected %|:foo|
24
+ plain %|.|
25
25
  end
26
26
  },
27
27
  )
@@ -45,11 +45,11 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
45
45
  snippet: snippet,
46
46
  expectation: proc {
47
47
  line do
48
- plain "Expected "
49
- beta %|#<Double (anonymous)>|
50
- plain " not to respond to "
51
- alpha %|:inspect|
52
- plain "."
48
+ plain %|Expected |
49
+ actual %|#<Double (anonymous)>|
50
+ plain %| not to respond to |
51
+ expected %|:inspect|
52
+ plain %|.|
53
53
  end
54
54
  },
55
55
  )
@@ -78,25 +78,25 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
78
78
  newline_before_expectation: true,
79
79
  expectation: proc {
80
80
  line do
81
- plain " Expected "
82
- beta %|#<Double :something_really_long>|
81
+ plain %| Expected |
82
+ actual %|#<Double :something_really_long>|
83
83
  end
84
84
 
85
85
  line do
86
- plain "to respond to "
87
- alpha %|:foo|
88
- plain ", "
89
- alpha %|:bar|
90
- plain ", "
91
- alpha %|:baz|
92
- plain ", "
93
- alpha %|:qux|
94
- plain ", "
95
- alpha %|:fizz|
96
- plain ", "
97
- alpha %|:buzz|
98
- plain " and "
99
- alpha %|:zing|
86
+ plain %|to respond to |
87
+ expected %|:foo|
88
+ plain %|, |
89
+ expected %|:bar|
90
+ plain %|, |
91
+ expected %|:baz|
92
+ plain %|, |
93
+ expected %|:qux|
94
+ plain %|, |
95
+ expected %|:fizz|
96
+ plain %|, |
97
+ expected %|:buzz|
98
+ plain %| and |
99
+ expected %|:zing|
100
100
  end
101
101
  },
102
102
  )
@@ -128,15 +128,15 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
128
128
  newline_before_expectation: true,
129
129
  expectation: proc {
130
130
  line do
131
- plain " Expected "
132
- beta %|#<B>|
131
+ plain %| Expected |
132
+ actual %|#<B>|
133
133
  end
134
134
 
135
135
  line do
136
- plain "not to respond to "
137
- alpha %|:some_really_long_method_and_stuff|
138
- plain " and "
139
- alpha %|:another_method_or_whatever|
136
+ plain %|not to respond to |
137
+ expected %|:some_really_long_method_and_stuff|
138
+ plain %| and |
139
+ expected %|:another_method_or_whatever|
140
140
  end
141
141
  },
142
142
  )
@@ -167,13 +167,13 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
167
167
  snippet: %|expect(double).to respond_to(:foo).with(3).arguments|,
168
168
  expectation: proc {
169
169
  line do
170
- plain "Expected "
171
- beta %|#<Double (anonymous)>|
172
- plain " to respond to "
173
- alpha %|:foo|
174
- plain " with "
175
- alpha %|3|
176
- plain " arguments."
170
+ plain %|Expected |
171
+ actual %|#<Double (anonymous)>|
172
+ plain %| to respond to |
173
+ expected %|:foo|
174
+ plain %| with |
175
+ expected %|3|
176
+ plain %| arguments.|
177
177
  end
178
178
  },
179
179
  )
@@ -203,13 +203,13 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
203
203
  snippet: %|expect(B.new).not_to respond_to(:foo).with(3).arguments|,
204
204
  expectation: proc {
205
205
  line do
206
- plain "Expected "
207
- beta %|#<B>|
208
- plain " not to respond to "
209
- alpha %|:foo|
210
- plain " with "
211
- alpha %|3|
212
- plain " arguments."
206
+ plain %|Expected |
207
+ actual %|#<B>|
208
+ plain %| not to respond to |
209
+ expected %|:foo|
210
+ plain %| with |
211
+ expected %|3|
212
+ plain %| arguments.|
213
213
  end
214
214
  },
215
215
  )
@@ -239,24 +239,24 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
239
239
  newline_before_expectation: true,
240
240
  expectation: proc {
241
241
  line do
242
- plain " Expected "
243
- beta %|#<Double :something_really_long>|
242
+ plain %| Expected |
243
+ actual %|#<Double :something_really_long>|
244
244
  end
245
245
 
246
246
  line do
247
- plain "to respond to "
248
- alpha %|:foo|
249
- plain ", "
250
- alpha %|:bar|
251
- plain ", "
252
- alpha %|:baz|
253
- plain ", "
254
- alpha %|:fizz|
255
- plain " and "
256
- alpha %|:buzz|
257
- plain " with "
258
- alpha %|3|
259
- plain " arguments"
247
+ plain %|to respond to |
248
+ expected %|:foo|
249
+ plain %|, |
250
+ expected %|:bar|
251
+ plain %|, |
252
+ expected %|:baz|
253
+ plain %|, |
254
+ expected %|:fizz|
255
+ plain %| and |
256
+ expected %|:buzz|
257
+ plain %| with |
258
+ expected %|3|
259
+ plain %| arguments|
260
260
  end
261
261
  },
262
262
  )
@@ -288,18 +288,18 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
288
288
  newline_before_expectation: true,
289
289
  expectation: proc {
290
290
  line do
291
- plain " Expected "
292
- beta %|#<B>|
291
+ plain %| Expected |
292
+ actual %|#<B>|
293
293
  end
294
294
 
295
295
  line do
296
- plain "not to respond to "
297
- alpha %|:some_really_long_method_and_stuff|
298
- plain " and "
299
- alpha %|:another_method_or_whatever|
300
- plain " with "
301
- alpha %|3|
302
- plain " arguments"
296
+ plain %|not to respond to |
297
+ expected %|:some_really_long_method_and_stuff|
298
+ plain %| and |
299
+ expected %|:another_method_or_whatever|
300
+ plain %| with |
301
+ expected %|3|
302
+ plain %| arguments|
303
303
  end
304
304
  },
305
305
  )
@@ -330,13 +330,13 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
330
330
  snippet: %|expect(double).to respond_to(:foo).with_keywords(:bar)|,
331
331
  expectation: proc {
332
332
  line do
333
- plain "Expected "
334
- beta %|#<Double (anonymous)>|
335
- plain " to respond to "
336
- alpha %|:foo|
337
- plain " with keyword "
338
- alpha %|:bar|
339
- plain "."
333
+ plain %|Expected |
334
+ actual %|#<Double (anonymous)>|
335
+ plain %| to respond to |
336
+ expected %|:foo|
337
+ plain %| with keyword |
338
+ expected %|:bar|
339
+ plain %|.|
340
340
  end
341
341
  },
342
342
  )
@@ -366,13 +366,13 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
366
366
  snippet: %|expect(B.new).not_to respond_to(:foo).with_keywords(:bar)|,
367
367
  expectation: proc {
368
368
  line do
369
- plain "Expected "
370
- beta %|#<B>|
371
- plain " not to respond to "
372
- alpha %|:foo|
373
- plain " with keyword "
374
- alpha %|:bar|
375
- plain "."
369
+ plain %|Expected |
370
+ actual %|#<B>|
371
+ plain %| not to respond to |
372
+ expected %|:foo|
373
+ plain %| with keyword |
374
+ expected %|:bar|
375
+ plain %|.|
376
376
  end
377
377
  },
378
378
  )
@@ -402,25 +402,25 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
402
402
  newline_before_expectation: true,
403
403
  expectation: proc {
404
404
  line do
405
- plain " Expected "
406
- beta %|#<Double :something_really_long>|
405
+ plain %| Expected |
406
+ actual %|#<Double :something_really_long>|
407
407
  end
408
408
 
409
409
  line do
410
- plain "to respond to "
411
- alpha %|:foo|
412
- plain ", "
413
- alpha %|:bar|
414
- plain ", "
415
- alpha %|:baz|
416
- plain ", "
417
- alpha %|:fizz|
418
- plain " and "
419
- alpha %|:buzz|
420
- plain " with keywords "
421
- alpha %|:qux|
422
- plain " and "
423
- alpha %|:blargh|
410
+ plain %|to respond to |
411
+ expected %|:foo|
412
+ plain %|, |
413
+ expected %|:bar|
414
+ plain %|, |
415
+ expected %|:baz|
416
+ plain %|, |
417
+ expected %|:fizz|
418
+ plain %| and |
419
+ expected %|:buzz|
420
+ plain %| with keywords |
421
+ expected %|:qux|
422
+ plain %| and |
423
+ expected %|:blargh|
424
424
  end
425
425
  },
426
426
  )
@@ -452,19 +452,19 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
452
452
  newline_before_expectation: true,
453
453
  expectation: proc {
454
454
  line do
455
- plain " Expected "
456
- beta %|#<B>|
455
+ plain %| Expected |
456
+ actual %|#<B>|
457
457
  end
458
458
 
459
459
  line do
460
- plain "not to respond to "
461
- alpha %|:some_really_long_method_and_stuff|
462
- plain " and "
463
- alpha %|:another_method_or_whatever|
464
- plain " with keywords "
465
- alpha %|:foo|
466
- plain " and "
467
- alpha %|:bar|
460
+ plain %|not to respond to |
461
+ expected %|:some_really_long_method_and_stuff|
462
+ plain %| and |
463
+ expected %|:another_method_or_whatever|
464
+ plain %| with keywords |
465
+ expected %|:foo|
466
+ plain %| and |
467
+ expected %|:bar|
468
468
  end
469
469
  },
470
470
  )
@@ -495,13 +495,13 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
495
495
  snippet: %|expect(double).to respond_to(:foo).with_any_keywords|,
496
496
  expectation: proc {
497
497
  line do
498
- plain "Expected "
499
- beta %|#<Double (anonymous)>|
500
- plain " to respond to "
501
- alpha %|:foo|
502
- plain " with "
503
- alpha %|any|
504
- plain " keywords."
498
+ plain %|Expected |
499
+ actual %|#<Double (anonymous)>|
500
+ plain %| to respond to |
501
+ expected %|:foo|
502
+ plain %| with |
503
+ expected %|any|
504
+ plain %| keywords.|
505
505
  end
506
506
  },
507
507
  )
@@ -531,13 +531,13 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
531
531
  snippet: %|expect(B.new).not_to respond_to(:foo).with_any_keywords|,
532
532
  expectation: proc {
533
533
  line do
534
- plain "Expected "
535
- beta %|#<B>|
536
- plain " not to respond to "
537
- alpha %|:foo|
538
- plain " with "
539
- alpha %|any|
540
- plain " keywords."
534
+ plain %|Expected |
535
+ actual %|#<B>|
536
+ plain %| not to respond to |
537
+ expected %|:foo|
538
+ plain %| with |
539
+ expected %|any|
540
+ plain %| keywords.|
541
541
  end
542
542
  },
543
543
  )
@@ -567,26 +567,26 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
567
567
  newline_before_expectation: true,
568
568
  expectation: proc {
569
569
  line do
570
- plain " Expected "
571
- beta %|#<Double :something_really_long>|
570
+ plain %| Expected |
571
+ actual %|#<Double :something_really_long>|
572
572
  end
573
573
 
574
574
  line do
575
- plain "to respond to "
576
- alpha %|:foo|
577
- plain ", "
578
- alpha %|:bar|
579
- plain ", "
580
- alpha %|:baz|
581
- plain ", "
582
- alpha %|:qux|
583
- plain ", "
584
- alpha %|:fizz|
585
- plain " and "
586
- alpha %|:buzz|
587
- plain " with "
588
- alpha %|any|
589
- plain " keywords "
575
+ plain %|to respond to |
576
+ expected %|:foo|
577
+ plain %|, |
578
+ expected %|:bar|
579
+ plain %|, |
580
+ expected %|:baz|
581
+ plain %|, |
582
+ expected %|:qux|
583
+ plain %|, |
584
+ expected %|:fizz|
585
+ plain %| and |
586
+ expected %|:buzz|
587
+ plain %| with |
588
+ expected %|any|
589
+ plain %| keywords |
590
590
  end
591
591
  },
592
592
  )
@@ -618,18 +618,18 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
618
618
  newline_before_expectation: true,
619
619
  expectation: proc {
620
620
  line do
621
- plain " Expected "
622
- beta %|#<B>|
621
+ plain %| Expected |
622
+ actual %|#<B>|
623
623
  end
624
624
 
625
625
  line do
626
- plain "not to respond to "
627
- alpha %|:some_really_long_method_and_stuff|
628
- plain " and "
629
- alpha %|:another_method_or_whatever|
630
- plain " with "
631
- alpha %|any|
632
- plain " keywords "
626
+ plain %|not to respond to |
627
+ expected %|:some_really_long_method_and_stuff|
628
+ plain %| and |
629
+ expected %|:another_method_or_whatever|
630
+ plain %| with |
631
+ expected %|any|
632
+ plain %| keywords |
633
633
  end
634
634
  },
635
635
  )
@@ -660,13 +660,13 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
660
660
  snippet: %|expect(double).to respond_to(:foo).with_unlimited_arguments|,
661
661
  expectation: proc {
662
662
  line do
663
- plain "Expected "
664
- beta %|#<Double (anonymous)>|
665
- plain " to respond to "
666
- alpha %|:foo|
667
- plain " with "
668
- alpha %|unlimited|
669
- plain " arguments."
663
+ plain %|Expected |
664
+ actual %|#<Double (anonymous)>|
665
+ plain %| to respond to |
666
+ expected %|:foo|
667
+ plain %| with |
668
+ expected %|unlimited|
669
+ plain %| arguments.|
670
670
  end
671
671
  },
672
672
  )
@@ -696,13 +696,13 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
696
696
  snippet: %|expect(B.new).not_to respond_to(:foo).with_unlimited_arguments|,
697
697
  expectation: proc {
698
698
  line do
699
- plain "Expected "
700
- beta %|#<B>|
701
- plain " not to respond to "
702
- alpha %|:foo|
703
- plain " with "
704
- alpha %|unlimited|
705
- plain " arguments."
699
+ plain %|Expected |
700
+ actual %|#<B>|
701
+ plain %| not to respond to |
702
+ expected %|:foo|
703
+ plain %| with |
704
+ expected %|unlimited|
705
+ plain %| arguments.|
706
706
  end
707
707
  },
708
708
  )
@@ -732,20 +732,20 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
732
732
  newline_before_expectation: true,
733
733
  expectation: proc {
734
734
  line do
735
- plain " Expected "
736
- beta %|#<Double :something_really_long>|
735
+ plain %| Expected |
736
+ actual %|#<Double :something_really_long>|
737
737
  end
738
738
 
739
739
  line do
740
- plain "to respond to "
741
- alpha %|:foo|
742
- plain ", "
743
- alpha %|:bar|
744
- plain " and "
745
- alpha %|:baz|
746
- plain " with "
747
- alpha %|unlimited|
748
- plain " arguments"
740
+ plain %|to respond to |
741
+ expected %|:foo|
742
+ plain %|, |
743
+ expected %|:bar|
744
+ plain %| and |
745
+ expected %|:baz|
746
+ plain %| with |
747
+ expected %|unlimited|
748
+ plain %| arguments|
749
749
  end
750
750
  },
751
751
  )
@@ -777,18 +777,18 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
777
777
  newline_before_expectation: true,
778
778
  expectation: proc {
779
779
  line do
780
- plain " Expected "
781
- beta %|#<B>|
780
+ plain %| Expected |
781
+ actual %|#<B>|
782
782
  end
783
783
 
784
784
  line do
785
- plain "not to respond to "
786
- alpha %|:some_really_long_method_and_stuff|
787
- plain " and "
788
- alpha %|:another_method_or_whatever|
789
- plain " with "
790
- alpha %|unlimited|
791
- plain " arguments"
785
+ plain %|not to respond to |
786
+ expected %|:some_really_long_method_and_stuff|
787
+ plain %| and |
788
+ expected %|:another_method_or_whatever|
789
+ plain %| with |
790
+ expected %|unlimited|
791
+ plain %| arguments|
792
792
  end
793
793
  },
794
794
  )
@@ -819,22 +819,22 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
819
819
  newline_before_expectation: true,
820
820
  expectation: proc {
821
821
  line do
822
- plain " Expected "
823
- beta %|#<Double :something_really_long>|
822
+ plain %| Expected |
823
+ actual %|#<Double :something_really_long>|
824
824
  end
825
825
 
826
826
  line do
827
- plain "to respond to "
828
- alpha %|:foo|
829
- plain ", "
830
- alpha %|:bar|
831
- plain " and "
832
- alpha %|:baz|
833
- plain " with "
834
- alpha %|any|
835
- plain " keywords and "
836
- alpha %|unlimited|
837
- plain " arguments"
827
+ plain %|to respond to |
828
+ expected %|:foo|
829
+ plain %|, |
830
+ expected %|:bar|
831
+ plain %| and |
832
+ expected %|:baz|
833
+ plain %| with |
834
+ expected %|any|
835
+ plain %| keywords and |
836
+ expected %|unlimited|
837
+ plain %| arguments|
838
838
  end
839
839
  },
840
840
  )
@@ -867,22 +867,22 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
867
867
  newline_before_expectation: true,
868
868
  expectation: proc {
869
869
  line do
870
- plain " Expected "
871
- beta %|#<B>|
870
+ plain %| Expected |
871
+ actual %|#<B>|
872
872
  end
873
873
 
874
874
  line do
875
- plain "not to respond to "
876
- alpha %|:foo|
877
- plain ", "
878
- alpha %|:bar|
879
- plain " and "
880
- alpha %|:baz|
881
- plain " with "
882
- alpha %|any|
883
- plain " keywords and "
884
- alpha %|unlimited|
885
- plain " arguments"
875
+ plain %|not to respond to |
876
+ expected %|:foo|
877
+ plain %|, |
878
+ expected %|:bar|
879
+ plain %| and |
880
+ expected %|:baz|
881
+ plain %| with |
882
+ expected %|any|
883
+ plain %| keywords and |
884
+ expected %|unlimited|
885
+ plain %| arguments|
886
886
  end
887
887
  },
888
888
  )
@@ -912,24 +912,24 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
912
912
  newline_before_expectation: true,
913
913
  expectation: proc {
914
914
  line do
915
- plain " Expected "
916
- beta %|#<Double :something_really_long>|
915
+ plain %| Expected |
916
+ actual %|#<Double :something_really_long>|
917
917
  end
918
918
 
919
919
  line do
920
- plain "to respond to "
921
- alpha %|:foo|
922
- plain ", "
923
- alpha %|:bar|
924
- plain " and "
925
- alpha %|:baz|
926
- plain " with keywords "
927
- alpha %|:qux|
928
- plain " and "
929
- alpha %|:blargh|
930
- plain " and "
931
- alpha %|unlimited|
932
- plain " arguments"
920
+ plain %|to respond to |
921
+ expected %|:foo|
922
+ plain %|, |
923
+ expected %|:bar|
924
+ plain %| and |
925
+ expected %|:baz|
926
+ plain %| with keywords |
927
+ expected %|:qux|
928
+ plain %| and |
929
+ expected %|:blargh|
930
+ plain %| and |
931
+ expected %|unlimited|
932
+ plain %| arguments|
933
933
  end
934
934
  },
935
935
  )
@@ -962,24 +962,24 @@ RSpec.describe "Integration with RSpec's #respond_to matcher", type: :integratio
962
962
  newline_before_expectation: true,
963
963
  expectation: proc {
964
964
  line do
965
- plain " Expected "
966
- beta %|#<B>|
965
+ plain %| Expected |
966
+ actual %|#<B>|
967
967
  end
968
968
 
969
969
  line do
970
- plain "not to respond to "
971
- alpha %|:foo|
972
- plain ", "
973
- alpha %|:bar|
974
- plain " and "
975
- alpha %|:baz|
976
- plain " with keywords "
977
- alpha %|:qux|
978
- plain " and "
979
- alpha %|:blargh|
980
- plain " and "
981
- alpha %|unlimited|
982
- plain " arguments"
970
+ plain %|not to respond to |
971
+ expected %|:foo|
972
+ plain %|, |
973
+ expected %|:bar|
974
+ plain %| and |
975
+ expected %|:baz|
976
+ plain %| with keywords |
977
+ expected %|:qux|
978
+ plain %| and |
979
+ expected %|:blargh|
980
+ plain %| and |
981
+ expected %|unlimited|
982
+ plain %| arguments|
983
983
  end
984
984
  },
985
985
  )