super_diff 0.4.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +64 -24
  3. data/lib/super_diff.rb +20 -17
  4. data/lib/super_diff/active_record.rb +20 -24
  5. data/lib/super_diff/active_record/diff_formatters/active_record_relation.rb +3 -3
  6. data/lib/super_diff/active_record/differs/active_record_relation.rb +3 -5
  7. data/lib/super_diff/active_record/object_inspection/inspectors/active_record_model.rb +32 -22
  8. data/lib/super_diff/active_record/object_inspection/inspectors/active_record_relation.rb +17 -7
  9. data/lib/super_diff/active_record/operation_tree_builders.rb +14 -0
  10. data/lib/super_diff/active_record/{operational_sequencers → operation_tree_builders}/active_record_model.rb +2 -2
  11. data/lib/super_diff/active_record/{operational_sequencers → operation_tree_builders}/active_record_relation.rb +4 -4
  12. data/lib/super_diff/active_record/{operation_sequences.rb → operation_trees.rb} +2 -2
  13. data/lib/super_diff/active_record/{operation_sequences → operation_trees}/active_record_relation.rb +2 -2
  14. data/lib/super_diff/active_support.rb +16 -19
  15. data/lib/super_diff/active_support/diff_formatters/hash_with_indifferent_access.rb +3 -3
  16. data/lib/super_diff/active_support/differs/hash_with_indifferent_access.rb +3 -5
  17. data/lib/super_diff/active_support/object_inspection/inspectors/hash_with_indifferent_access.rb +17 -7
  18. data/lib/super_diff/active_support/operation_tree_builders.rb +10 -0
  19. data/lib/super_diff/active_support/{operational_sequencers → operation_tree_builders}/hash_with_indifferent_access.rb +2 -2
  20. data/lib/super_diff/active_support/{operation_sequences.rb → operation_trees.rb} +2 -2
  21. data/lib/super_diff/active_support/{operation_sequences → operation_trees}/hash_with_indifferent_access.rb +2 -2
  22. data/lib/super_diff/colorized_document_extensions.rb +4 -4
  23. data/lib/super_diff/configuration.rb +70 -0
  24. data/lib/super_diff/csi.rb +2 -1
  25. data/lib/super_diff/diff_formatters.rb +3 -3
  26. data/lib/super_diff/diff_formatters/array.rb +3 -3
  27. data/lib/super_diff/diff_formatters/base.rb +3 -2
  28. data/lib/super_diff/diff_formatters/collection.rb +3 -3
  29. data/lib/super_diff/diff_formatters/custom_object.rb +3 -3
  30. data/lib/super_diff/diff_formatters/default_object.rb +6 -8
  31. data/lib/super_diff/diff_formatters/defaults.rb +10 -0
  32. data/lib/super_diff/diff_formatters/hash.rb +3 -3
  33. data/lib/super_diff/diff_formatters/main.rb +41 -0
  34. data/lib/super_diff/diff_formatters/multiline_string.rb +7 -7
  35. data/lib/super_diff/differs.rb +4 -11
  36. data/lib/super_diff/differs/array.rb +2 -11
  37. data/lib/super_diff/differs/base.rb +20 -3
  38. data/lib/super_diff/differs/custom_object.rb +2 -11
  39. data/lib/super_diff/differs/default_object.rb +2 -8
  40. data/lib/super_diff/differs/defaults.rb +12 -0
  41. data/lib/super_diff/differs/hash.rb +2 -11
  42. data/lib/super_diff/differs/main.rb +48 -0
  43. data/lib/super_diff/differs/multiline_string.rb +2 -14
  44. data/lib/super_diff/differs/time_like.rb +15 -0
  45. data/lib/super_diff/equality_matchers.rb +3 -9
  46. data/lib/super_diff/equality_matchers/array.rb +3 -9
  47. data/lib/super_diff/equality_matchers/base.rb +1 -1
  48. data/lib/super_diff/equality_matchers/default.rb +3 -9
  49. data/lib/super_diff/equality_matchers/defaults.rb +12 -0
  50. data/lib/super_diff/equality_matchers/hash.rb +3 -9
  51. data/lib/super_diff/equality_matchers/main.rb +21 -0
  52. data/lib/super_diff/equality_matchers/multiline_string.rb +3 -9
  53. data/lib/super_diff/equality_matchers/primitive.rb +2 -2
  54. data/lib/super_diff/equality_matchers/singleline_string.rb +2 -2
  55. data/lib/super_diff/errors.rb +16 -0
  56. data/lib/super_diff/errors/no_diff_formatter_available_error.rb +21 -0
  57. data/lib/super_diff/errors/no_differ_available_error.rb +24 -0
  58. data/lib/super_diff/errors/no_operational_sequencer_available_error.rb +22 -0
  59. data/lib/super_diff/gem_version.rb +45 -0
  60. data/lib/super_diff/implementation_checks.rb +19 -0
  61. data/lib/super_diff/object_inspection.rb +1 -10
  62. data/lib/super_diff/object_inspection/inspection_tree.rb +6 -2
  63. data/lib/super_diff/object_inspection/inspectors.rb +5 -1
  64. data/lib/super_diff/object_inspection/inspectors/array.rb +20 -10
  65. data/lib/super_diff/object_inspection/inspectors/base.rb +36 -0
  66. data/lib/super_diff/object_inspection/inspectors/custom_object.rb +24 -14
  67. data/lib/super_diff/object_inspection/inspectors/default_object.rb +44 -30
  68. data/lib/super_diff/object_inspection/inspectors/defaults.rb +15 -0
  69. data/lib/super_diff/object_inspection/inspectors/hash.rb +20 -10
  70. data/lib/super_diff/object_inspection/inspectors/main.rb +35 -0
  71. data/lib/super_diff/object_inspection/inspectors/primitive.rb +20 -5
  72. data/lib/super_diff/object_inspection/inspectors/string.rb +15 -5
  73. data/lib/super_diff/object_inspection/inspectors/time_like.rb +23 -0
  74. data/lib/super_diff/object_inspection/nodes/inspection.rb +9 -2
  75. data/lib/super_diff/operation_tree_builders.rb +18 -0
  76. data/lib/super_diff/{operational_sequencers → operation_tree_builders}/array.rb +38 -59
  77. data/lib/super_diff/operation_tree_builders/base.rb +98 -0
  78. data/lib/super_diff/{operational_sequencers → operation_tree_builders}/custom_object.rb +3 -3
  79. data/lib/super_diff/{operational_sequencers → operation_tree_builders}/default_object.rb +8 -3
  80. data/lib/super_diff/operation_tree_builders/defaults.rb +5 -0
  81. data/lib/super_diff/operation_tree_builders/hash.rb +226 -0
  82. data/lib/super_diff/operation_tree_builders/main.rb +42 -0
  83. data/lib/super_diff/{operational_sequencers → operation_tree_builders}/multiline_string.rb +3 -3
  84. data/lib/super_diff/operation_tree_builders/time_like.rb +34 -0
  85. data/lib/super_diff/operation_trees.rb +13 -0
  86. data/lib/super_diff/{operation_sequences → operation_trees}/array.rb +5 -1
  87. data/lib/super_diff/{operation_sequences → operation_trees}/base.rb +9 -1
  88. data/lib/super_diff/{operation_sequences → operation_trees}/custom_object.rb +5 -1
  89. data/lib/super_diff/{operation_sequences → operation_trees}/default_object.rb +10 -8
  90. data/lib/super_diff/operation_trees/defaults.rb +5 -0
  91. data/lib/super_diff/{operation_sequences → operation_trees}/hash.rb +5 -1
  92. data/lib/super_diff/operation_trees/main.rb +35 -0
  93. data/lib/super_diff/operation_trees/multiline_string.rb +18 -0
  94. data/lib/super_diff/operations/unary_operation.rb +3 -0
  95. data/lib/super_diff/recursion_guard.rb +2 -0
  96. data/lib/super_diff/rspec.rb +49 -13
  97. data/lib/super_diff/rspec/augmented_matcher.rb +1 -1
  98. data/lib/super_diff/rspec/differ.rb +2 -17
  99. data/lib/super_diff/rspec/differs/collection_containing_exactly.rb +2 -7
  100. data/lib/super_diff/rspec/differs/collection_including.rb +2 -7
  101. data/lib/super_diff/rspec/differs/hash_including.rb +2 -7
  102. data/lib/super_diff/rspec/differs/object_having_attributes.rb +2 -7
  103. data/lib/super_diff/rspec/matcher_text_builders/base.rb +7 -7
  104. data/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb +6 -6
  105. data/lib/super_diff/rspec/matcher_text_builders/contain_exactly.rb +1 -1
  106. data/lib/super_diff/rspec/matcher_text_builders/have_predicate.rb +4 -4
  107. data/lib/super_diff/rspec/matcher_text_builders/match.rb +1 -1
  108. data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +1 -1
  109. data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +6 -6
  110. data/lib/super_diff/rspec/matcher_text_template.rb +1 -1
  111. data/lib/super_diff/rspec/monkey_patches.rb +23 -14
  112. data/lib/super_diff/rspec/object_inspection.rb +0 -1
  113. data/lib/super_diff/rspec/object_inspection/inspectors.rb +16 -0
  114. data/lib/super_diff/rspec/object_inspection/inspectors/collection_containing_exactly.rb +17 -8
  115. data/lib/super_diff/rspec/object_inspection/inspectors/collection_including.rb +15 -9
  116. data/lib/super_diff/rspec/object_inspection/inspectors/hash_including.rb +20 -10
  117. data/lib/super_diff/rspec/object_inspection/inspectors/instance_of.rb +23 -0
  118. data/lib/super_diff/rspec/object_inspection/inspectors/kind_of.rb +23 -0
  119. data/lib/super_diff/rspec/object_inspection/inspectors/object_having_attributes.rb +20 -11
  120. data/lib/super_diff/rspec/object_inspection/inspectors/primitive.rb +13 -0
  121. data/lib/super_diff/rspec/object_inspection/inspectors/value_within.rb +29 -0
  122. data/lib/super_diff/rspec/operation_tree_builders.rb +22 -0
  123. data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/collection_containing_exactly.rb +17 -6
  124. data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/collection_including.rb +2 -2
  125. data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/hash_including.rb +3 -11
  126. data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/object_having_attributes.rb +4 -8
  127. data/lib/super_diff/version.rb +1 -1
  128. data/spec/examples.txt +393 -393
  129. data/spec/integration/rspec/be_falsey_matcher_spec.rb +10 -10
  130. data/spec/integration/rspec/be_matcher_spec.rb +100 -100
  131. data/spec/integration/rspec/be_nil_matcher_spec.rb +10 -10
  132. data/spec/integration/rspec/be_predicate_matcher_spec.rb +103 -103
  133. data/spec/integration/rspec/be_truthy_matcher_spec.rb +10 -10
  134. data/spec/integration/rspec/contain_exactly_matcher_spec.rb +107 -107
  135. data/spec/integration/rspec/eq_matcher_spec.rb +230 -230
  136. data/spec/integration/rspec/have_attributes_matcher_spec.rb +360 -233
  137. data/spec/integration/rspec/have_predicate_matcher_spec.rb +65 -65
  138. data/spec/integration/rspec/include_matcher_spec.rb +73 -73
  139. data/spec/integration/rspec/match_array_matcher_spec.rb +149 -107
  140. data/spec/integration/rspec/match_matcher_spec.rb +274 -274
  141. data/spec/integration/rspec/raise_error_matcher_spec.rb +86 -86
  142. data/spec/integration/rspec/respond_to_matcher_spec.rb +240 -240
  143. data/spec/integration/rspec/third_party_matcher_spec.rb +8 -8
  144. data/spec/integration/rspec/unhandled_errors_spec.rb +69 -13
  145. data/spec/spec_helper.rb +22 -13
  146. data/spec/support/command_runner.rb +3 -0
  147. data/spec/support/integration/helpers.rb +15 -95
  148. data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +15 -30
  149. data/spec/support/integration/test_programs/base.rb +122 -0
  150. data/spec/support/integration/test_programs/plain.rb +13 -0
  151. data/spec/support/integration/test_programs/rspec_active_record.rb +17 -0
  152. data/spec/support/integration/test_programs/rspec_active_support.rb +17 -0
  153. data/spec/support/integration/test_programs/rspec_rails.rb +17 -0
  154. data/spec/support/models/active_record/person.rb +4 -11
  155. data/spec/support/models/active_record/shipping_address.rb +10 -14
  156. data/spec/support/object_id.rb +6 -5
  157. data/spec/support/shared_examples/active_record.rb +108 -108
  158. data/spec/support/shared_examples/hash_with_indifferent_access.rb +196 -232
  159. data/spec/tmp/integration_spec.rb +15 -0
  160. data/spec/unit/{equality_matcher_spec.rb → equality_matchers/main_spec.rb} +518 -362
  161. data/spec/unit/object_inspection_spec.rb +77 -1
  162. data/super_diff.gemspec +3 -2
  163. metadata +83 -54
  164. data/lib/super_diff/active_record/object_inspection/map_extension.rb +0 -18
  165. data/lib/super_diff/active_record/operational_sequencers.rb +0 -14
  166. data/lib/super_diff/active_support/object_inspection/map_extension.rb +0 -15
  167. data/lib/super_diff/active_support/operational_sequencers.rb +0 -10
  168. data/lib/super_diff/diff_formatter.rb +0 -32
  169. data/lib/super_diff/differ.rb +0 -51
  170. data/lib/super_diff/differs/time.rb +0 -24
  171. data/lib/super_diff/equality_matcher.rb +0 -32
  172. data/lib/super_diff/no_differ_available_error.rb +0 -22
  173. data/lib/super_diff/no_operational_sequencer_available_error.rb +0 -20
  174. data/lib/super_diff/object_inspection/inspector.rb +0 -27
  175. data/lib/super_diff/object_inspection/inspectors/time.rb +0 -13
  176. data/lib/super_diff/object_inspection/map.rb +0 -30
  177. data/lib/super_diff/operation_sequences.rb +0 -9
  178. data/lib/super_diff/operational_sequencer.rb +0 -48
  179. data/lib/super_diff/operational_sequencers.rb +0 -17
  180. data/lib/super_diff/operational_sequencers/base.rb +0 -89
  181. data/lib/super_diff/operational_sequencers/hash.rb +0 -85
  182. data/lib/super_diff/operational_sequencers/time_like.rb +0 -30
  183. data/lib/super_diff/rspec/configuration.rb +0 -31
  184. data/lib/super_diff/rspec/object_inspection/map_extension.rb +0 -23
  185. data/lib/super_diff/rspec/operational_sequencers.rb +0 -22
@@ -0,0 +1,15 @@
1
+ require "/Users/elliot/code/github/mine/super_diff/spec/config/zeus_plan.rb"
2
+
3
+ zeus_plan = CustomZeusPlan.new
4
+ zeus_plan.boot
5
+
6
+ zeus_plan.run_plain_test
7
+
8
+ RSpec.describe "test" do
9
+ it "passes" do
10
+ expected = "This is a line\nAnd that's a line\nAnd there's a line too\n"
11
+ actual = "This is a line\nSomething completely different\nAnd there's a line too\n"
12
+ expect(actual).to eq(expected)
13
+ end
14
+ end
15
+
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe SuperDiff::EqualityMatcher do
3
+ RSpec.describe SuperDiff::EqualityMatchers::Main do
4
4
  describe "#call" do
5
5
  context "given the same integers" do
6
6
  it "returns an empty string" do
@@ -27,8 +27,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
27
27
 
28
28
  #{
29
29
  colored do
30
- alpha_line %(Expected: 42)
31
- beta_line %( Actual: 1)
30
+ expected_line %(Expected: 42)
31
+ actual_line %( Actual: 1)
32
32
  end
33
33
  }
34
34
  STR
@@ -54,8 +54,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
54
54
 
55
55
  #{
56
56
  colored do
57
- alpha_line %(Expected: :foo)
58
- beta_line %( Actual: :bar)
57
+ expected_line %(Expected: :foo)
58
+ actual_line %( Actual: :bar)
59
59
  end
60
60
  }
61
61
  STR
@@ -84,8 +84,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
84
84
 
85
85
  #{
86
86
  colored do
87
- alpha_line %(Expected: "Marty")
88
- beta_line %( Actual: "Jennifer")
87
+ expected_line %(Expected: "Marty")
88
+ actual_line %( Actual: "Jennifer")
89
89
  end
90
90
  }
91
91
  STR
@@ -106,8 +106,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
106
106
 
107
107
  #{
108
108
  colored do
109
- alpha_line %(Expected: "Marty")
110
- beta_line %( Actual: "Marty McFly")
109
+ expected_line %(Expected: "Marty")
110
+ actual_line %( Actual: "Marty McFly")
111
111
  end
112
112
  }
113
113
  STR
@@ -128,8 +128,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
128
128
 
129
129
  #{
130
130
  colored do
131
- alpha_line %(Expected: "Something entirely different")
132
- beta_line %( Actual: "This is a line\\nAnd that's another line\\n")
131
+ expected_line %(Expected: "Something entirely different")
132
+ actual_line %( Actual: "This is a line\\nAnd that's another line\\n")
133
133
  end
134
134
  }
135
135
  STR
@@ -150,8 +150,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
150
150
 
151
151
  #{
152
152
  colored do
153
- alpha_line %(Expected: "This is a line\\nAnd that's another line\\n")
154
- beta_line %( Actual: "Something entirely different")
153
+ expected_line %(Expected: "This is a line\\nAnd that's another line\\n")
154
+ actual_line %( Actual: "Something entirely different")
155
155
  end
156
156
  }
157
157
  STR
@@ -172,8 +172,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
172
172
 
173
173
  #{
174
174
  colored do
175
- alpha_line %(Expected: "This is a line\\nAnd that's a line\\nAnd there's a line too")
176
- beta_line %( Actual: "This is a line\\nSomething completely different\\nAnd there's a line too")
175
+ expected_line %(Expected: "This is a line\\nAnd that's a line\\nAnd there's a line too")
176
+ actual_line %( Actual: "This is a line\\nSomething completely different\\nAnd there's a line too")
177
177
  end
178
178
  }
179
179
 
@@ -181,10 +181,10 @@ RSpec.describe SuperDiff::EqualityMatcher do
181
181
 
182
182
  #{
183
183
  colored do
184
- plain_line %( This is a line\\n)
185
- alpha_line %(- And that's a line\\n)
186
- beta_line %(+ Something completely different\\n)
187
- plain_line %( And there's a line too)
184
+ plain_line %( This is a line\\n)
185
+ expected_line %(- And that's a line\\n)
186
+ actual_line %(+ Something completely different\\n)
187
+ plain_line %( And there's a line too)
188
188
  end
189
189
  }
190
190
  STR
@@ -205,8 +205,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
205
205
 
206
206
  #{
207
207
  colored do
208
- alpha_line %(Expected: "This is a line\\nAnd that's a line\\n")
209
- beta_line %( Actual: "Something completely different\\nAnd something else too\\n")
208
+ expected_line %(Expected: "This is a line\\nAnd that's a line\\n")
209
+ actual_line %( Actual: "Something completely different\\nAnd something else too\\n")
210
210
  end
211
211
  }
212
212
 
@@ -214,10 +214,10 @@ RSpec.describe SuperDiff::EqualityMatcher do
214
214
 
215
215
  #{
216
216
  colored do
217
- alpha_line %(- This is a line\\n)
218
- alpha_line %(- And that's a line\\n)
219
- beta_line %(+ Something completely different\\n)
220
- beta_line %(+ And something else too\\n)
217
+ expected_line %(- This is a line\\n)
218
+ expected_line %(- And that's a line\\n)
219
+ actual_line %(+ Something completely different\\n)
220
+ actual_line %(+ And something else too\\n)
221
221
  end
222
222
  }
223
223
  STR
@@ -264,12 +264,12 @@ RSpec.describe SuperDiff::EqualityMatcher do
264
264
 
265
265
  #{
266
266
  colored do
267
- alpha_line do
267
+ expected_line do
268
268
  text "Expected: "
269
269
  text %("\\e[34mThis is a line\\e[0m\\n\\e[38;5;176mAnd that's a line\\e[0m\\n\\e[38;2;47;59;164mAnd there's a line too\\e[0m\\n")
270
270
  end
271
271
 
272
- beta_line do
272
+ actual_line do
273
273
  text " Actual: "
274
274
  text %("\\e[34mThis is a line\\e[0m\\n\\e[38;5;176mSomething completely different\\e[0m\\n\\e[38;2;47;59;164mAnd there's a line too\\e[0m\\n")
275
275
  end
@@ -280,10 +280,10 @@ RSpec.describe SuperDiff::EqualityMatcher do
280
280
 
281
281
  #{
282
282
  colored do
283
- plain_line %( \\e[34mThis is a line\\e[0m\\n)
284
- alpha_line %(- \\e[38;5;176mAnd that's a line\\e[0m\\n)
285
- beta_line %(+ \\e[38;5;176mSomething completely different\\e[0m\\n)
286
- plain_line %( \\e[38;2;47;59;164mAnd there's a line too\\e[0m\\n)
283
+ plain_line %( \\e[34mThis is a line\\e[0m\\n)
284
+ expected_line %(- \\e[38;5;176mAnd that's a line\\e[0m\\n)
285
+ actual_line %(+ \\e[38;5;176mSomething completely different\\e[0m\\n)
286
+ plain_line %( \\e[38;2;47;59;164mAnd there's a line too\\e[0m\\n)
287
287
  end
288
288
  }
289
289
  STR
@@ -315,8 +315,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
315
315
 
316
316
  #{
317
317
  colored do
318
- alpha_line %(Expected: [1, 2, 3, 4])
319
- beta_line %( Actual: [1, 2, 99, 4])
318
+ expected_line %(Expected: [1, 2, 3, 4])
319
+ actual_line %( Actual: [1, 2, 99, 4])
320
320
  end
321
321
  }
322
322
 
@@ -324,13 +324,13 @@ RSpec.describe SuperDiff::EqualityMatcher do
324
324
 
325
325
  #{
326
326
  colored do
327
- plain_line %( [)
328
- plain_line %( 1,)
329
- plain_line %( 2,)
330
- alpha_line %(- 3,)
331
- beta_line %(+ 99,)
332
- plain_line %( 4)
333
- plain_line %( ])
327
+ plain_line %( [)
328
+ plain_line %( 1,)
329
+ plain_line %( 2,)
330
+ expected_line %(- 3,)
331
+ actual_line %(+ 99,)
332
+ plain_line %( 4)
333
+ plain_line %( ])
334
334
  end
335
335
  }
336
336
  STR
@@ -351,8 +351,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
351
351
 
352
352
  #{
353
353
  colored do
354
- alpha_line %(Expected: [:one, :fish, :two, :fish])
355
- beta_line %( Actual: [:one, :FISH, :two, :fish])
354
+ expected_line %(Expected: [:one, :fish, :two, :fish])
355
+ actual_line %( Actual: [:one, :FISH, :two, :fish])
356
356
  end
357
357
  }
358
358
 
@@ -360,13 +360,13 @@ RSpec.describe SuperDiff::EqualityMatcher do
360
360
 
361
361
  #{
362
362
  colored do
363
- plain_line %( [)
364
- plain_line %( :one,)
365
- alpha_line %(- :fish,)
366
- beta_line %(+ :FISH,)
367
- plain_line %( :two,)
368
- plain_line %( :fish)
369
- plain_line %( ])
363
+ plain_line %( [)
364
+ plain_line %( :one,)
365
+ expected_line %(- :fish,)
366
+ actual_line %(+ :FISH,)
367
+ plain_line %( :two,)
368
+ plain_line %( :fish)
369
+ plain_line %( ])
370
370
  end
371
371
  }
372
372
  STR
@@ -387,8 +387,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
387
387
 
388
388
  #{
389
389
  colored do
390
- alpha_line %(Expected: ["sausage", "egg", "cheese"])
391
- beta_line %( Actual: ["bacon", "egg", "cheese"])
390
+ expected_line %(Expected: ["sausage", "egg", "cheese"])
391
+ actual_line %( Actual: ["bacon", "egg", "cheese"])
392
392
  end
393
393
  }
394
394
 
@@ -396,12 +396,12 @@ RSpec.describe SuperDiff::EqualityMatcher do
396
396
 
397
397
  #{
398
398
  colored do
399
- plain_line %( [)
400
- alpha_line %(- "sausage",)
401
- beta_line %(+ "bacon",)
402
- plain_line %( "egg",)
403
- plain_line %( "cheese")
404
- plain_line %( ])
399
+ plain_line %( [)
400
+ expected_line %(- "sausage",)
401
+ actual_line %(+ "bacon",)
402
+ plain_line %( "egg",)
403
+ plain_line %( "cheese")
404
+ plain_line %( ])
405
405
  end
406
406
  }
407
407
  STR
@@ -428,8 +428,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
428
428
 
429
429
  #{
430
430
  colored do
431
- alpha_line %(Expected: [#<SuperDiff::Test::Person name: "Marty", age: 18>, #<SuperDiff::Test::Person name: "Jennifer", age: 17>])
432
- beta_line %( Actual: [#<SuperDiff::Test::Person name: "Marty", age: 18>, #<SuperDiff::Test::Person name: "Doc", age: 50>])
431
+ expected_line %(Expected: [#<SuperDiff::Test::Person name: "Marty", age: 18>, #<SuperDiff::Test::Person name: "Jennifer", age: 17>])
432
+ actual_line %( Actual: [#<SuperDiff::Test::Person name: "Marty", age: 18>, #<SuperDiff::Test::Person name: "Doc", age: 50>])
433
433
  end
434
434
  }
435
435
 
@@ -437,18 +437,18 @@ RSpec.describe SuperDiff::EqualityMatcher do
437
437
 
438
438
  #{
439
439
  colored do
440
- plain_line %( [)
441
- plain_line %( #<SuperDiff::Test::Person {)
442
- plain_line %( name: "Marty",)
443
- plain_line %( age: 18)
444
- plain_line %( }>,)
445
- plain_line %( #<SuperDiff::Test::Person {)
446
- alpha_line %(- name: "Jennifer",)
447
- beta_line %(+ name: "Doc",)
448
- alpha_line %(- age: 17)
449
- beta_line %(+ age: 50)
450
- plain_line %( }>)
451
- plain_line %( ])
440
+ plain_line %( [)
441
+ plain_line %( #<SuperDiff::Test::Person {)
442
+ plain_line %( name: "Marty",)
443
+ plain_line %( age: 18)
444
+ plain_line %( }>,)
445
+ plain_line %( #<SuperDiff::Test::Person {)
446
+ expected_line %(- name: "Jennifer",)
447
+ actual_line %(+ name: "Doc",)
448
+ expected_line %(- age: 17)
449
+ actual_line %(+ age: 50)
450
+ plain_line %( }>)
451
+ plain_line %( ])
452
452
  end
453
453
  }
454
454
  STR
@@ -469,8 +469,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
469
469
 
470
470
  #{
471
471
  colored do
472
- alpha_line %(Expected: ["bread"])
473
- beta_line %( Actual: ["bread", "eggs", "milk"])
472
+ expected_line %(Expected: ["bread"])
473
+ actual_line %( Actual: ["bread", "eggs", "milk"])
474
474
  end
475
475
  }
476
476
 
@@ -478,11 +478,11 @@ RSpec.describe SuperDiff::EqualityMatcher do
478
478
 
479
479
  #{
480
480
  colored do
481
- plain_line %( [)
482
- plain_line %( "bread",)
483
- beta_line %(+ "eggs",)
484
- beta_line %(+ "milk")
485
- plain_line %( ])
481
+ plain_line %( [)
482
+ plain_line %( "bread",)
483
+ actual_line %(+ "eggs",)
484
+ actual_line %(+ "milk")
485
+ plain_line %( ])
486
486
  end
487
487
  }
488
488
  STR
@@ -503,8 +503,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
503
503
 
504
504
  #{
505
505
  colored do
506
- alpha_line %(Expected: ["bread", "eggs", "milk"])
507
- beta_line %( Actual: ["bread"])
506
+ expected_line %(Expected: ["bread", "eggs", "milk"])
507
+ actual_line %( Actual: ["bread"])
508
508
  end
509
509
  }
510
510
 
@@ -512,11 +512,11 @@ RSpec.describe SuperDiff::EqualityMatcher do
512
512
 
513
513
  #{
514
514
  colored do
515
- plain_line %( [)
516
- plain_line %( "bread")
517
- alpha_line %(- "eggs",)
518
- alpha_line %(- "milk")
519
- plain_line %( ])
515
+ plain_line %( [)
516
+ plain_line %( "bread")
517
+ expected_line %(- "eggs",)
518
+ expected_line %(- "milk")
519
+ plain_line %( ])
520
520
  end
521
521
  }
522
522
  STR
@@ -537,8 +537,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
537
537
 
538
538
  #{
539
539
  colored do
540
- alpha_line %(Expected: ["milk"])
541
- beta_line %( Actual: ["bread", "eggs", "milk"])
540
+ expected_line %(Expected: ["milk"])
541
+ actual_line %( Actual: ["bread", "eggs", "milk"])
542
542
  end
543
543
  }
544
544
 
@@ -546,11 +546,11 @@ RSpec.describe SuperDiff::EqualityMatcher do
546
546
 
547
547
  #{
548
548
  colored do
549
- plain_line %( [)
550
- beta_line %(+ "bread",)
551
- beta_line %(+ "eggs",)
552
- plain_line %( "milk")
553
- plain_line %( ])
549
+ plain_line %( [)
550
+ actual_line %(+ "bread",)
551
+ actual_line %(+ "eggs",)
552
+ plain_line %( "milk")
553
+ plain_line %( ])
554
554
  end
555
555
  }
556
556
  STR
@@ -571,8 +571,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
571
571
 
572
572
  #{
573
573
  colored do
574
- alpha_line %(Expected: ["bread", "eggs", "milk"])
575
- beta_line %( Actual: ["milk"])
574
+ expected_line %(Expected: ["bread", "eggs", "milk"])
575
+ actual_line %( Actual: ["milk"])
576
576
  end
577
577
  }
578
578
 
@@ -580,11 +580,11 @@ RSpec.describe SuperDiff::EqualityMatcher do
580
580
 
581
581
  #{
582
582
  colored do
583
- plain_line %( [)
584
- alpha_line %(- "bread",)
585
- alpha_line %(- "eggs",)
586
- plain_line %( "milk")
587
- plain_line %( ])
583
+ plain_line %( [)
584
+ expected_line %(- "bread",)
585
+ expected_line %(- "eggs",)
586
+ plain_line %( "milk")
587
+ plain_line %( ])
588
588
  end
589
589
  }
590
590
  STR
@@ -605,8 +605,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
605
605
 
606
606
  #{
607
607
  colored do
608
- alpha_line %(Expected: [1, 2, [:a, :b, :c], 4])
609
- beta_line %( Actual: [1, 2, [:a, :x, :c], 4])
608
+ expected_line %(Expected: [1, 2, [:a, :b, :c], 4])
609
+ actual_line %( Actual: [1, 2, [:a, :x, :c], 4])
610
610
  end
611
611
  }
612
612
 
@@ -614,17 +614,17 @@ RSpec.describe SuperDiff::EqualityMatcher do
614
614
 
615
615
  #{
616
616
  colored do
617
- plain_line %( [)
618
- plain_line %( 1,)
619
- plain_line %( 2,)
620
- plain_line %( [)
621
- plain_line %( :a,)
622
- alpha_line %(- :b,)
623
- beta_line %(+ :x,)
624
- plain_line %( :c)
625
- plain_line %( ],)
626
- plain_line %( 4)
627
- plain_line %( ])
617
+ plain_line %( [)
618
+ plain_line %( 1,)
619
+ plain_line %( 2,)
620
+ plain_line %( [)
621
+ plain_line %( :a,)
622
+ expected_line %(- :b,)
623
+ actual_line %(+ :x,)
624
+ plain_line %( :c)
625
+ plain_line %( ],)
626
+ plain_line %( 4)
627
+ plain_line %( ])
628
628
  end
629
629
  }
630
630
  STR
@@ -645,8 +645,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
645
645
 
646
646
  #{
647
647
  colored do
648
- alpha_line %(Expected: [1, 2, { foo: "bar", baz: "qux" }, 4])
649
- beta_line %( Actual: [1, 2, { foo: "bar", baz: "qox" }, 4])
648
+ expected_line %(Expected: [1, 2, { foo: "bar", baz: "qux" }, 4])
649
+ actual_line %( Actual: [1, 2, { foo: "bar", baz: "qox" }, 4])
650
650
  end
651
651
  }
652
652
 
@@ -654,16 +654,16 @@ RSpec.describe SuperDiff::EqualityMatcher do
654
654
 
655
655
  #{
656
656
  colored do
657
- plain_line %( [)
658
- plain_line %( 1,)
659
- plain_line %( 2,)
660
- plain_line %( {)
661
- plain_line %( foo: "bar",)
662
- alpha_line %(- baz: "qux")
663
- beta_line %(+ baz: "qox")
664
- plain_line %( },)
665
- plain_line %( 4)
666
- plain_line %( ])
657
+ plain_line %( [)
658
+ plain_line %( 1,)
659
+ plain_line %( 2,)
660
+ plain_line %( {)
661
+ plain_line %( foo: "bar",)
662
+ expected_line %(- baz: "qux")
663
+ actual_line %(+ baz: "qox")
664
+ plain_line %( },)
665
+ plain_line %( 4)
666
+ plain_line %( ])
667
667
  end
668
668
  }
669
669
  STR
@@ -689,8 +689,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
689
689
 
690
690
  #{
691
691
  colored do
692
- alpha_line %(Expected: [1, 2, #<SuperDiff::Test::Person name: "Marty", age: 18>, 4])
693
- beta_line %( Actual: [1, 2, #<SuperDiff::Test::Person name: "Doc", age: 50>, 4])
692
+ expected_line %(Expected: [1, 2, #<SuperDiff::Test::Person name: "Marty", age: 18>, 4])
693
+ actual_line %( Actual: [1, 2, #<SuperDiff::Test::Person name: "Doc", age: 50>, 4])
694
694
  end
695
695
  }
696
696
 
@@ -698,17 +698,17 @@ RSpec.describe SuperDiff::EqualityMatcher do
698
698
 
699
699
  #{
700
700
  colored do
701
- plain_line %( [)
702
- plain_line %( 1,)
703
- plain_line %( 2,)
704
- plain_line %( #<SuperDiff::Test::Person {)
705
- alpha_line %(- name: "Marty",)
706
- beta_line %(+ name: "Doc",)
707
- alpha_line %(- age: 18)
708
- beta_line %(+ age: 50)
709
- plain_line %( }>,)
710
- plain_line %( 4)
711
- plain_line %( ])
701
+ plain_line %( [)
702
+ plain_line %( 1,)
703
+ plain_line %( 2,)
704
+ plain_line %( #<SuperDiff::Test::Person {)
705
+ expected_line %(- name: "Marty",)
706
+ actual_line %(+ name: "Doc",)
707
+ expected_line %(- age: 18)
708
+ actual_line %(+ age: 50)
709
+ plain_line %( }>,)
710
+ plain_line %( 4)
711
+ plain_line %( ])
712
712
  end
713
713
  }
714
714
  STR
@@ -749,8 +749,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
749
749
 
750
750
  #{
751
751
  colored do
752
- alpha_line %(Expected: [[:h1, [:span, [:text, "Hello world"]], { class: "header", data: { "sticky" => true } }]])
753
- beta_line %( Actual: [[:h2, [:span, [:text, "Goodbye world"]], { id: "hero", class: "header", data: { "sticky" => false, :role => "deprecated" } }], :br])
752
+ expected_line %(Expected: [[:h1, [:span, [:text, "Hello world"]], { class: "header", data: { "sticky" => true } }]])
753
+ actual_line %( Actual: [[:h2, [:span, [:text, "Goodbye world"]], { id: "hero", class: "header", data: { "sticky" => false, :role => "deprecated" } }], :br])
754
754
  end
755
755
  }
756
756
 
@@ -758,30 +758,30 @@ RSpec.describe SuperDiff::EqualityMatcher do
758
758
 
759
759
  #{
760
760
  colored do
761
- plain_line %( [)
762
- plain_line %( [)
763
- alpha_line %(- :h1,)
764
- beta_line %(+ :h2,)
765
- plain_line %( [)
766
- plain_line %( :span,)
767
- plain_line %( [)
768
- plain_line %( :text,)
769
- alpha_line %(- "Hello world")
770
- beta_line %(+ "Goodbye world")
771
- plain_line %( ])
772
- plain_line %( ],)
773
- plain_line %( {)
774
- beta_line %(+ id: "hero",)
775
- plain_line %( class: "header",)
776
- plain_line %( data: {)
777
- alpha_line %(- "sticky" => true)
778
- beta_line %(+ "sticky" => false,)
779
- beta_line %(+ role: "deprecated")
780
- plain_line %( })
781
- plain_line %( })
782
- plain_line %( ],)
783
- beta_line %(+ :br)
784
- plain_line %( ])
761
+ plain_line %( [)
762
+ plain_line %( [)
763
+ expected_line %(- :h1,)
764
+ actual_line %(+ :h2,)
765
+ plain_line %( [)
766
+ plain_line %( :span,)
767
+ plain_line %( [)
768
+ plain_line %( :text,)
769
+ expected_line %(- "Hello world")
770
+ actual_line %(+ "Goodbye world")
771
+ plain_line %( ])
772
+ plain_line %( ],)
773
+ plain_line %( {)
774
+ actual_line %(+ id: "hero",)
775
+ plain_line %( class: "header",)
776
+ plain_line %( data: {)
777
+ expected_line %(- "sticky" => true)
778
+ actual_line %(+ "sticky" => false,)
779
+ actual_line %(+ role: "deprecated")
780
+ plain_line %( })
781
+ plain_line %( })
782
+ plain_line %( ],)
783
+ actual_line %(+ :br)
784
+ plain_line %( ])
785
785
  end
786
786
  }
787
787
  STR
@@ -813,8 +813,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
813
813
 
814
814
  #{
815
815
  colored do
816
- alpha_line %(Expected: { tall: 12, grande: 19, venti: 20 })
817
- beta_line %( Actual: { tall: 12, grande: 16, venti: 20 })
816
+ expected_line %(Expected: { tall: 12, grande: 19, venti: 20 })
817
+ actual_line %( Actual: { tall: 12, grande: 16, venti: 20 })
818
818
  end
819
819
  }
820
820
 
@@ -822,12 +822,12 @@ RSpec.describe SuperDiff::EqualityMatcher do
822
822
 
823
823
  #{
824
824
  colored do
825
- plain_line %( {)
826
- plain_line %( tall: 12,)
827
- alpha_line %(- grande: 19,)
828
- beta_line %(+ grande: 16,)
829
- plain_line %( venti: 20)
830
- plain_line %( })
825
+ plain_line %( {)
826
+ plain_line %( tall: 12,)
827
+ expected_line %(- grande: 19,)
828
+ actual_line %(+ grande: 16,)
829
+ plain_line %( venti: 20)
830
+ plain_line %( })
831
831
  end
832
832
  }
833
833
  STR
@@ -848,8 +848,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
848
848
 
849
849
  #{
850
850
  colored do
851
- alpha_line %(Expected: { "tall" => 12, "grande" => 19, "venti" => 20 })
852
- beta_line %( Actual: { "tall" => 12, "grande" => 16, "venti" => 20 })
851
+ expected_line %(Expected: { "tall" => 12, "grande" => 19, "venti" => 20 })
852
+ actual_line %( Actual: { "tall" => 12, "grande" => 16, "venti" => 20 })
853
853
  end
854
854
  }
855
855
 
@@ -857,12 +857,12 @@ RSpec.describe SuperDiff::EqualityMatcher do
857
857
 
858
858
  #{
859
859
  colored do
860
- plain_line %( {)
861
- plain_line %( "tall" => 12,)
862
- alpha_line %(- "grande" => 19,)
863
- beta_line %(+ "grande" => 16,)
864
- plain_line %( "venti" => 20)
865
- plain_line %( })
860
+ plain_line %( {)
861
+ plain_line %( "tall" => 12,)
862
+ expected_line %(- "grande" => 19,)
863
+ actual_line %(+ "grande" => 16,)
864
+ plain_line %( "venti" => 20)
865
+ plain_line %( })
866
866
  end
867
867
  }
868
868
  STR
@@ -883,8 +883,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
883
883
 
884
884
  #{
885
885
  colored do
886
- alpha_line %(Expected: { tall: :small, grande: :grand, venti: :large })
887
- beta_line %( Actual: { tall: :small, grande: :medium, venti: :large })
886
+ expected_line %(Expected: { tall: :small, grande: :grand, venti: :large })
887
+ actual_line %( Actual: { tall: :small, grande: :medium, venti: :large })
888
888
  end
889
889
  }
890
890
 
@@ -892,12 +892,12 @@ RSpec.describe SuperDiff::EqualityMatcher do
892
892
 
893
893
  #{
894
894
  colored do
895
- plain_line %( {)
896
- plain_line %( tall: :small,)
897
- alpha_line %(- grande: :grand,)
898
- beta_line %(+ grande: :medium,)
899
- plain_line %( venti: :large)
900
- plain_line %( })
895
+ plain_line %( {)
896
+ plain_line %( tall: :small,)
897
+ expected_line %(- grande: :grand,)
898
+ actual_line %(+ grande: :medium,)
899
+ plain_line %( venti: :large)
900
+ plain_line %( })
901
901
  end
902
902
  }
903
903
  STR
@@ -918,8 +918,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
918
918
 
919
919
  #{
920
920
  colored do
921
- alpha_line %(Expected: { tall: "small", grande: "grand", venti: "large" })
922
- beta_line %( Actual: { tall: "small", grande: "medium", venti: "large" })
921
+ expected_line %(Expected: { tall: "small", grande: "grand", venti: "large" })
922
+ actual_line %( Actual: { tall: "small", grande: "medium", venti: "large" })
923
923
  end
924
924
  }
925
925
 
@@ -927,12 +927,12 @@ RSpec.describe SuperDiff::EqualityMatcher do
927
927
 
928
928
  #{
929
929
  colored do
930
- plain_line %( {)
931
- plain_line %( tall: "small",)
932
- alpha_line %(- grande: "grand",)
933
- beta_line %(+ grande: "medium",)
934
- plain_line %( venti: "large")
935
- plain_line %( })
930
+ plain_line %( {)
931
+ plain_line %( tall: "small",)
932
+ expected_line %(- grande: "grand",)
933
+ actual_line %(+ grande: "medium",)
934
+ plain_line %( venti: "large")
935
+ plain_line %( })
936
936
  end
937
937
  }
938
938
  STR
@@ -959,8 +959,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
959
959
 
960
960
  #{
961
961
  colored do
962
- alpha_line %(Expected: { steve: #<SuperDiff::Test::Person name: "Jobs", age: 30>, susan: #<SuperDiff::Test::Person name: "Kare", age: 27> })
963
- beta_line %( Actual: { steve: #<SuperDiff::Test::Person name: "Wozniak", age: 33>, susan: #<SuperDiff::Test::Person name: "Kare", age: 27> })
962
+ expected_line %(Expected: { steve: #<SuperDiff::Test::Person name: "Jobs", age: 30>, susan: #<SuperDiff::Test::Person name: "Kare", age: 27> })
963
+ actual_line %( Actual: { steve: #<SuperDiff::Test::Person name: "Wozniak", age: 33>, susan: #<SuperDiff::Test::Person name: "Kare", age: 27> })
964
964
  end
965
965
  }
966
966
 
@@ -968,18 +968,18 @@ RSpec.describe SuperDiff::EqualityMatcher do
968
968
 
969
969
  #{
970
970
  colored do
971
- plain_line %( {)
972
- plain_line %( steve: #<SuperDiff::Test::Person {)
973
- alpha_line %(- name: "Jobs",)
974
- beta_line %(+ name: "Wozniak",)
975
- alpha_line %(- age: 30)
976
- beta_line %(+ age: 33)
977
- plain_line %( }>,)
978
- plain_line %( susan: #<SuperDiff::Test::Person {)
979
- plain_line %( name: "Kare",)
980
- plain_line %( age: 27)
981
- plain_line %( }>)
982
- plain_line %( })
971
+ plain_line %( {)
972
+ plain_line %( steve: #<SuperDiff::Test::Person {)
973
+ expected_line %(- name: "Jobs",)
974
+ actual_line %(+ name: "Wozniak",)
975
+ expected_line %(- age: 30)
976
+ actual_line %(+ age: 33)
977
+ plain_line %( }>,)
978
+ plain_line %( susan: #<SuperDiff::Test::Person {)
979
+ plain_line %( name: "Kare",)
980
+ plain_line %( age: 27)
981
+ plain_line %( }>)
982
+ plain_line %( })
983
983
  end
984
984
  }
985
985
  STR
@@ -1000,8 +1000,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1000
1000
 
1001
1001
  #{
1002
1002
  colored do
1003
- alpha_line %(Expected: { latte: 4.5 })
1004
- beta_line %( Actual: { latte: 4.5, mocha: 3.5, cortado: 3 })
1003
+ expected_line %(Expected: { latte: 4.5 })
1004
+ actual_line %( Actual: { latte: 4.5, mocha: 3.5, cortado: 3 })
1005
1005
  end
1006
1006
  }
1007
1007
 
@@ -1009,11 +1009,11 @@ RSpec.describe SuperDiff::EqualityMatcher do
1009
1009
 
1010
1010
  #{
1011
1011
  colored do
1012
- plain_line %( {)
1013
- plain_line %( latte: 4.5,)
1014
- beta_line %(+ mocha: 3.5,)
1015
- beta_line %(+ cortado: 3)
1016
- plain_line %( })
1012
+ plain_line %( {)
1013
+ plain_line %( latte: 4.5,)
1014
+ actual_line %(+ mocha: 3.5,)
1015
+ actual_line %(+ cortado: 3)
1016
+ plain_line %( })
1017
1017
  end
1018
1018
  }
1019
1019
  STR
@@ -1034,8 +1034,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1034
1034
 
1035
1035
  #{
1036
1036
  colored do
1037
- alpha_line %(Expected: { latte: 4.5, mocha: 3.5, cortado: 3 })
1038
- beta_line %( Actual: { latte: 4.5 })
1037
+ expected_line %(Expected: { latte: 4.5, mocha: 3.5, cortado: 3 })
1038
+ actual_line %( Actual: { latte: 4.5 })
1039
1039
  end
1040
1040
  }
1041
1041
 
@@ -1043,11 +1043,11 @@ RSpec.describe SuperDiff::EqualityMatcher do
1043
1043
 
1044
1044
  #{
1045
1045
  colored do
1046
- plain_line %( {)
1047
- plain_line %( latte: 4.5)
1048
- alpha_line %(- mocha: 3.5,)
1049
- alpha_line %(- cortado: 3)
1050
- plain_line %( })
1046
+ plain_line %( {)
1047
+ plain_line %( latte: 4.5)
1048
+ expected_line %(- mocha: 3.5,)
1049
+ expected_line %(- cortado: 3)
1050
+ plain_line %( })
1051
1051
  end
1052
1052
  }
1053
1053
  STR
@@ -1056,6 +1056,162 @@ RSpec.describe SuperDiff::EqualityMatcher do
1056
1056
  end
1057
1057
  end
1058
1058
 
1059
+ context "given two equal-size, one-dimensional hashes where there is a mixture of missing and extra keys in relatively the same order" do
1060
+ context "and the actual value is in relatively the same order as the expected" do
1061
+ it "preserves the order of the keys as they are defined" do
1062
+ actual_output = described_class.call(
1063
+ expected: {
1064
+ listed_count: 37_009,
1065
+ created_at: "Tue Jan 13 19:28:24 +0000 2009",
1066
+ favourites_count: 38,
1067
+ geo_enabled: false,
1068
+ verified: true,
1069
+ statuses_count: 273_860,
1070
+ media_count: 51_044,
1071
+ contributors_enabled: false,
1072
+ profile_background_color: "FFF1E0",
1073
+ profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",
1074
+ profile_background_tile: false,
1075
+ profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
1076
+ profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
1077
+ profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592",
1078
+ },
1079
+ actual: {
1080
+ listed_count: 37_009,
1081
+ created_at: "Tue Jan 13 19:28:24 +0000 2009",
1082
+ favourites_count: 38,
1083
+ utc_offset: nil,
1084
+ time_zone: nil,
1085
+ statuses_count: 273_860,
1086
+ media_count: 51_044,
1087
+ contributors_enabled: false,
1088
+ is_translator: false,
1089
+ is_translation_enabled: false,
1090
+ profile_background_color: "FFF1E0",
1091
+ profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",
1092
+ profile_background_tile: false,
1093
+ profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592",
1094
+ }
1095
+ )
1096
+
1097
+ expected_output = <<~STR.strip
1098
+ Differing hashes.
1099
+
1100
+ #{
1101
+ colored do
1102
+ expected_line %(Expected: { listed_count: 37009, created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, geo_enabled: false, verified: true, statuses_count: 273860, media_count: 51044, contributors_enabled: false, profile_background_color: "FFF1E0", profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png", profile_background_tile: false, profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592" })
1103
+ actual_line %( Actual: { listed_count: 37009, created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, utc_offset: nil, time_zone: nil, statuses_count: 273860, media_count: 51044, contributors_enabled: false, is_translator: false, is_translation_enabled: false, profile_background_color: "FFF1E0", profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png", profile_background_tile: false, profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592" })
1104
+ end
1105
+ }
1106
+
1107
+ Diff:
1108
+
1109
+ #{
1110
+ colored do
1111
+ plain_line %( {)
1112
+ plain_line %( listed_count: 37009,)
1113
+ plain_line %( created_at: "Tue Jan 13 19:28:24 +0000 2009",)
1114
+ plain_line %( favourites_count: 38,)
1115
+ expected_line %(- geo_enabled: false,)
1116
+ expected_line %(- verified: true,)
1117
+ actual_line %(+ utc_offset: nil,)
1118
+ actual_line %(+ time_zone: nil,)
1119
+ plain_line %( statuses_count: 273860,)
1120
+ plain_line %( media_count: 51044,)
1121
+ plain_line %( contributors_enabled: false,)
1122
+ actual_line %(+ is_translator: false,)
1123
+ actual_line %(+ is_translation_enabled: false,)
1124
+ plain_line %( profile_background_color: "FFF1E0",)
1125
+ plain_line %( profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",)
1126
+ plain_line %( profile_background_tile: false,)
1127
+ expected_line %(- profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",)
1128
+ expected_line %(- profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",)
1129
+ plain_line %( profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592")
1130
+ plain_line %( })
1131
+ end
1132
+ }
1133
+ STR
1134
+
1135
+ expect(actual_output).to eq(expected_output)
1136
+ end
1137
+ end
1138
+
1139
+ context "and the actual value is in a different order than the expected" do
1140
+ it "preserves the order of the keys as they are defined" do
1141
+ actual_output = described_class.call(
1142
+ expected: {
1143
+ created_at: "Tue Jan 13 19:28:24 +0000 2009",
1144
+ favourites_count: 38,
1145
+ geo_enabled: false,
1146
+ verified: true,
1147
+ media_count: 51_044,
1148
+ statuses_count: 273_860,
1149
+ contributors_enabled: false,
1150
+ profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",
1151
+ profile_background_color: "FFF1E0",
1152
+ profile_background_tile: false,
1153
+ profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
1154
+ listed_count: 37_009,
1155
+ profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592",
1156
+ },
1157
+ actual: {
1158
+ listed_count: 37_009,
1159
+ created_at: "Tue Jan 13 19:28:24 +0000 2009",
1160
+ favourites_count: 38,
1161
+ utc_offset: nil,
1162
+ statuses_count: 273_860,
1163
+ media_count: 51_044,
1164
+ contributors_enabled: false,
1165
+ is_translator: false,
1166
+ is_translation_enabled: false,
1167
+ profile_background_color: "FFF1E0",
1168
+ profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",
1169
+ profile_background_tile: false,
1170
+ profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592",
1171
+ }
1172
+ )
1173
+
1174
+ expected_output = <<~STR.strip
1175
+ Differing hashes.
1176
+
1177
+ #{
1178
+ colored do
1179
+ expected_line %(Expected: { created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, geo_enabled: false, verified: true, media_count: 51044, statuses_count: 273860, contributors_enabled: false, profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png", profile_background_color: "FFF1E0", profile_background_tile: false, profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", listed_count: 37009, profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592" })
1180
+ actual_line %( Actual: { listed_count: 37009, created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, utc_offset: nil, statuses_count: 273860, media_count: 51044, contributors_enabled: false, is_translator: false, is_translation_enabled: false, profile_background_color: "FFF1E0", profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png", profile_background_tile: false, profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592" })
1181
+ end
1182
+ }
1183
+
1184
+ Diff:
1185
+
1186
+ #{
1187
+ colored do
1188
+ plain_line %( {)
1189
+ plain_line %( listed_count: 37009,)
1190
+ plain_line %( created_at: "Tue Jan 13 19:28:24 +0000 2009",)
1191
+ plain_line %( favourites_count: 38,)
1192
+ expected_line %(- geo_enabled: false,)
1193
+ expected_line %(- verified: true,)
1194
+ actual_line %(+ utc_offset: nil,)
1195
+ plain_line %( statuses_count: 273860,)
1196
+ plain_line %( media_count: 51044,)
1197
+ plain_line %( contributors_enabled: false,)
1198
+ actual_line %(+ is_translator: false,)
1199
+ actual_line %(+ is_translation_enabled: false,)
1200
+ plain_line %( profile_background_color: "FFF1E0",)
1201
+ plain_line %( profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",)
1202
+ plain_line %( profile_background_tile: false,)
1203
+ expected_line %(- profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",)
1204
+ plain_line %( profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592")
1205
+ plain_line %( })
1206
+ end
1207
+ }
1208
+ STR
1209
+
1210
+ expect(actual_output).to eq(expected_output)
1211
+ end
1212
+ end
1213
+ end
1214
+
1059
1215
  context "given two hashes containing arrays with differing values" do
1060
1216
  it "returns a message along with the diff" do
1061
1217
  actual_output = described_class.call(
@@ -1076,8 +1232,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1076
1232
 
1077
1233
  #{
1078
1234
  colored do
1079
- alpha_line %(Expected: { name: "Elliot", interests: ["music", "football", "programming"], age: 30 })
1080
- beta_line %( Actual: { name: "Elliot", interests: ["music", "travel", "programming"], age: 30 })
1235
+ expected_line %(Expected: { name: "Elliot", interests: ["music", "football", "programming"], age: 30 })
1236
+ actual_line %( Actual: { name: "Elliot", interests: ["music", "travel", "programming"], age: 30 })
1081
1237
  end
1082
1238
  }
1083
1239
 
@@ -1085,16 +1241,16 @@ RSpec.describe SuperDiff::EqualityMatcher do
1085
1241
 
1086
1242
  #{
1087
1243
  colored do
1088
- plain_line %( {)
1089
- plain_line %( name: "Elliot",)
1090
- plain_line %( interests: [)
1091
- plain_line %( "music",)
1092
- alpha_line %(- "football",)
1093
- beta_line %(+ "travel",)
1094
- plain_line %( "programming")
1095
- plain_line %( ],)
1096
- plain_line %( age: 30)
1097
- plain_line %( })
1244
+ plain_line %( {)
1245
+ plain_line %( name: "Elliot",)
1246
+ plain_line %( interests: [)
1247
+ plain_line %( "music",)
1248
+ expected_line %(- "football",)
1249
+ actual_line %(+ "travel",)
1250
+ plain_line %( "programming")
1251
+ plain_line %( ],)
1252
+ plain_line %( age: 30)
1253
+ plain_line %( })
1098
1254
  end
1099
1255
  }
1100
1256
  STR
@@ -1131,8 +1287,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1131
1287
 
1132
1288
  #{
1133
1289
  colored do
1134
- alpha_line %(Expected: { check_spelling: true, substitutions: { "YOLO" => "You only live once", "BRB" => "Buns, ribs, and bacon", "YMMV" => "Your mileage may vary" }, check_grammar: false })
1135
- beta_line %( Actual: { check_spelling: true, substitutions: { "YOLO" => "You only live once", "BRB" => "Be right back", "YMMV" => "Your mileage may vary" }, check_grammar: false })
1290
+ expected_line %(Expected: { check_spelling: true, substitutions: { "YOLO" => "You only live once", "BRB" => "Buns, ribs, and bacon", "YMMV" => "Your mileage may vary" }, check_grammar: false })
1291
+ actual_line %( Actual: { check_spelling: true, substitutions: { "YOLO" => "You only live once", "BRB" => "Be right back", "YMMV" => "Your mileage may vary" }, check_grammar: false })
1136
1292
  end
1137
1293
  }
1138
1294
 
@@ -1140,16 +1296,16 @@ RSpec.describe SuperDiff::EqualityMatcher do
1140
1296
 
1141
1297
  #{
1142
1298
  colored do
1143
- plain_line %( {)
1144
- plain_line %( check_spelling: true,)
1145
- plain_line %( substitutions: {)
1146
- plain_line %( "YOLO" => "You only live once",)
1147
- alpha_line %(- "BRB" => "Buns, ribs, and bacon",)
1148
- beta_line %(+ "BRB" => "Be right back",)
1149
- plain_line %( "YMMV" => "Your mileage may vary")
1150
- plain_line %( },)
1151
- plain_line %( check_grammar: false)
1152
- plain_line %( })
1299
+ plain_line %( {)
1300
+ plain_line %( check_spelling: true,)
1301
+ plain_line %( substitutions: {)
1302
+ plain_line %( "YOLO" => "You only live once",)
1303
+ expected_line %(- "BRB" => "Buns, ribs, and bacon",)
1304
+ actual_line %(+ "BRB" => "Be right back",)
1305
+ plain_line %( "YMMV" => "Your mileage may vary")
1306
+ plain_line %( },)
1307
+ plain_line %( check_grammar: false)
1308
+ plain_line %( })
1153
1309
  end
1154
1310
  }
1155
1311
  STR
@@ -1178,8 +1334,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1178
1334
 
1179
1335
  #{
1180
1336
  colored do
1181
- alpha_line %(Expected: { order_id: 1234, person: #<SuperDiff::Test::Person name: "Marty", age: 18>, amount: 35000 })
1182
- beta_line %( Actual: { order_id: 1234, person: #<SuperDiff::Test::Person name: "Doc", age: 50>, amount: 35000 })
1337
+ expected_line %(Expected: { order_id: 1234, person: #<SuperDiff::Test::Person name: "Marty", age: 18>, amount: 35000 })
1338
+ actual_line %( Actual: { order_id: 1234, person: #<SuperDiff::Test::Person name: "Doc", age: 50>, amount: 35000 })
1183
1339
  end
1184
1340
  }
1185
1341
 
@@ -1187,16 +1343,16 @@ RSpec.describe SuperDiff::EqualityMatcher do
1187
1343
 
1188
1344
  #{
1189
1345
  colored do
1190
- plain_line %( {)
1191
- plain_line %( order_id: 1234,)
1192
- plain_line %( person: #<SuperDiff::Test::Person {)
1193
- alpha_line %(- name: "Marty",)
1194
- beta_line %(+ name: "Doc",)
1195
- alpha_line %(- age: 18)
1196
- beta_line %(+ age: 50)
1197
- plain_line %( }>,)
1198
- plain_line %( amount: 35000)
1199
- plain_line %( })
1346
+ plain_line %( {)
1347
+ plain_line %( order_id: 1234,)
1348
+ plain_line %( person: #<SuperDiff::Test::Person {)
1349
+ expected_line %(- name: "Marty",)
1350
+ actual_line %(+ name: "Doc",)
1351
+ expected_line %(- age: 18)
1352
+ actual_line %(+ age: 50)
1353
+ plain_line %( }>,)
1354
+ plain_line %( amount: 35000)
1355
+ plain_line %( })
1200
1356
  end
1201
1357
  }
1202
1358
  STR
@@ -1253,8 +1409,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1253
1409
 
1254
1410
  #{
1255
1411
  colored do
1256
- alpha_line %(Expected: { customer: { name: "Marty McFly", shipping_address: { line_1: "123 Main St.", city: "Hill Valley", state: "CA", zip: "90382" } }, items: [{ name: "Fender Stratocaster", cost: 100000, options: ["red", "blue", "green"] }, { name: "Chevy 4x4" }] })
1257
- beta_line %( Actual: { customer: { name: "Marty McFly, Jr.", shipping_address: { line_1: "456 Ponderosa Ct.", city: "Hill Valley", state: "CA", zip: "90382" } }, items: [{ name: "Fender Stratocaster", cost: 100000, options: ["red", "blue", "green"] }, { name: "Mattel Hoverboard" }] })
1412
+ expected_line %(Expected: { customer: { name: "Marty McFly", shipping_address: { line_1: "123 Main St.", city: "Hill Valley", state: "CA", zip: "90382" } }, items: [{ name: "Fender Stratocaster", cost: 100000, options: ["red", "blue", "green"] }, { name: "Chevy 4x4" }] })
1413
+ actual_line %( Actual: { customer: { name: "Marty McFly, Jr.", shipping_address: { line_1: "456 Ponderosa Ct.", city: "Hill Valley", state: "CA", zip: "90382" } }, items: [{ name: "Fender Stratocaster", cost: 100000, options: ["red", "blue", "green"] }, { name: "Mattel Hoverboard" }] })
1258
1414
  end
1259
1415
  }
1260
1416
 
@@ -1262,34 +1418,34 @@ RSpec.describe SuperDiff::EqualityMatcher do
1262
1418
 
1263
1419
  #{
1264
1420
  colored do
1265
- plain_line %( {)
1266
- plain_line %( customer: {)
1267
- alpha_line %(- name: "Marty McFly",)
1268
- beta_line %(+ name: "Marty McFly, Jr.",)
1269
- plain_line %( shipping_address: {)
1270
- alpha_line %(- line_1: "123 Main St.",)
1271
- beta_line %(+ line_1: "456 Ponderosa Ct.",)
1272
- plain_line %( city: "Hill Valley",)
1273
- plain_line %( state: "CA",)
1274
- plain_line %( zip: "90382")
1275
- plain_line %( })
1276
- plain_line %( },)
1277
- plain_line %( items: [)
1278
- plain_line %( {)
1279
- plain_line %( name: "Fender Stratocaster",)
1280
- plain_line %( cost: 100000,)
1281
- plain_line %( options: [)
1282
- plain_line %( "red",)
1283
- plain_line %( "blue",)
1284
- plain_line %( "green")
1285
- plain_line %( ])
1286
- plain_line %( },)
1287
- plain_line %( {)
1288
- alpha_line %(- name: "Chevy 4x4")
1289
- beta_line %(+ name: "Mattel Hoverboard")
1290
- plain_line %( })
1291
- plain_line %( ])
1292
- plain_line %( })
1421
+ plain_line %( {)
1422
+ plain_line %( customer: {)
1423
+ expected_line %(- name: "Marty McFly",)
1424
+ actual_line %(+ name: "Marty McFly, Jr.",)
1425
+ plain_line %( shipping_address: {)
1426
+ expected_line %(- line_1: "123 Main St.",)
1427
+ actual_line %(+ line_1: "456 Ponderosa Ct.",)
1428
+ plain_line %( city: "Hill Valley",)
1429
+ plain_line %( state: "CA",)
1430
+ plain_line %( zip: "90382")
1431
+ plain_line %( })
1432
+ plain_line %( },)
1433
+ plain_line %( items: [)
1434
+ plain_line %( {)
1435
+ plain_line %( name: "Fender Stratocaster",)
1436
+ plain_line %( cost: 100000,)
1437
+ plain_line %( options: [)
1438
+ plain_line %( "red",)
1439
+ plain_line %( "blue",)
1440
+ plain_line %( "green")
1441
+ plain_line %( ])
1442
+ plain_line %( },)
1443
+ plain_line %( {)
1444
+ expected_line %(- name: "Chevy 4x4")
1445
+ actual_line %(+ name: "Mattel Hoverboard")
1446
+ plain_line %( })
1447
+ plain_line %( ])
1448
+ plain_line %( })
1293
1449
  end
1294
1450
  }
1295
1451
  STR
@@ -1324,8 +1480,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1324
1480
 
1325
1481
  #{
1326
1482
  colored do
1327
- alpha_line %(Expected: #<SuperDiff::Test::Person name: "Marty", age: 18>)
1328
- beta_line %( Actual: #<SuperDiff::Test::Person name: "Doc", age: 50>)
1483
+ expected_line %(Expected: #<SuperDiff::Test::Person name: "Marty", age: 18>)
1484
+ actual_line %( Actual: #<SuperDiff::Test::Person name: "Doc", age: 50>)
1329
1485
  end
1330
1486
  }
1331
1487
 
@@ -1333,12 +1489,12 @@ RSpec.describe SuperDiff::EqualityMatcher do
1333
1489
 
1334
1490
  #{
1335
1491
  colored do
1336
- plain_line %( #<SuperDiff::Test::Person {)
1337
- alpha_line %(- name: "Marty",)
1338
- beta_line %(+ name: "Doc",)
1339
- alpha_line %(- age: 18)
1340
- beta_line %(+ age: 50)
1341
- plain_line %( }>)
1492
+ plain_line %( #<SuperDiff::Test::Person {)
1493
+ expected_line %(- name: "Marty",)
1494
+ actual_line %(+ name: "Doc",)
1495
+ expected_line %(- age: 18)
1496
+ actual_line %(+ age: 50)
1497
+ plain_line %( }>)
1342
1498
  end
1343
1499
  }
1344
1500
  STR
@@ -1375,13 +1531,13 @@ RSpec.describe SuperDiff::EqualityMatcher do
1375
1531
  if SuperDiff::Test.jruby?
1376
1532
  # Source: <https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyBasicObject.java>
1377
1533
  colored do
1378
- alpha_line %(Expected: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(expected)} @inventory=["flatline", "purple body shield"], @character="mirage", @handle="martymcfly", @ultimate=0.8, @shields=0.6, @health=0.3>)
1379
- beta_line %( Actual: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(actual)} @inventory=["wingman", "mastiff"], @character="lifeline", @handle="docbrown", @ultimate=0.8, @shields=0.6, @health=0.3>)
1534
+ expected_line %(Expected: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(expected)} @inventory=["flatline", "purple body shield"], @character="mirage", @handle="martymcfly", @ultimate=0.8, @shields=0.6, @health=0.3>)
1535
+ actual_line %( Actual: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(actual)} @inventory=["wingman", "mastiff"], @character="lifeline", @handle="docbrown", @ultimate=0.8, @shields=0.6, @health=0.3>)
1380
1536
  end
1381
1537
  else
1382
1538
  colored do
1383
- alpha_line %(Expected: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(expected)} @handle="martymcfly", @character="mirage", @inventory=["flatline", "purple body shield"], @shields=0.6, @health=0.3, @ultimate=0.8>)
1384
- beta_line %( Actual: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(actual)} @handle="docbrown", @character="lifeline", @inventory=["wingman", "mastiff"], @shields=0.6, @health=0.3, @ultimate=0.8>)
1539
+ expected_line %(Expected: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(expected)} @handle="martymcfly", @character="mirage", @inventory=["flatline", "purple body shield"], @shields=0.6, @health=0.3, @ultimate=0.8>)
1540
+ actual_line %( Actual: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(actual)} @handle="docbrown", @character="lifeline", @inventory=["wingman", "mastiff"], @shields=0.6, @health=0.3, @ultimate=0.8>)
1385
1541
  end
1386
1542
  end
1387
1543
  }
@@ -1390,21 +1546,21 @@ RSpec.describe SuperDiff::EqualityMatcher do
1390
1546
 
1391
1547
  #{
1392
1548
  colored do
1393
- plain_line %( #<SuperDiff::Test::Player {)
1394
- alpha_line %(- @character="mirage",)
1395
- beta_line %(+ @character="lifeline",)
1396
- alpha_line %(- @handle="martymcfly",)
1397
- beta_line %(+ @handle="docbrown",)
1398
- plain_line %( @health=0.3,)
1399
- plain_line %( @inventory=[)
1400
- alpha_line %(- "flatline",)
1401
- beta_line %(+ "wingman",)
1402
- alpha_line %(- "purple body shield")
1403
- beta_line %(+ "mastiff")
1404
- plain_line %( ],)
1405
- plain_line %( @shields=0.6,)
1406
- plain_line %( @ultimate=0.8)
1407
- plain_line %( }>)
1549
+ plain_line %( #<SuperDiff::Test::Player {)
1550
+ expected_line %(- @character="mirage",)
1551
+ actual_line %(+ @character="lifeline",)
1552
+ expected_line %(- @handle="martymcfly",)
1553
+ actual_line %(+ @handle="docbrown",)
1554
+ plain_line %( @health=0.3,)
1555
+ plain_line %( @inventory=[)
1556
+ expected_line %(- "flatline",)
1557
+ actual_line %(+ "wingman",)
1558
+ expected_line %(- "purple body shield")
1559
+ actual_line %(+ "mastiff")
1560
+ plain_line %( ],)
1561
+ plain_line %( @shields=0.6,)
1562
+ plain_line %( @ultimate=0.8)
1563
+ plain_line %( }>)
1408
1564
  end
1409
1565
  }
1410
1566
  STR
@@ -1432,8 +1588,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1432
1588
 
1433
1589
  #{
1434
1590
  colored do
1435
- alpha_line %(Expected: #<SuperDiff::Test::Person name: "Marty", age: 31>)
1436
- beta_line %( Actual: #<SuperDiff::Test::Customer name: "Doc", shipping_address: :some_shipping_address, phone: "1234567890">)
1591
+ expected_line %(Expected: #<SuperDiff::Test::Person name: "Marty", age: 31>)
1592
+ actual_line %( Actual: #<SuperDiff::Test::Customer name: "Doc", shipping_address: :some_shipping_address, phone: "1234567890">)
1437
1593
  end
1438
1594
  }
1439
1595
  STR
@@ -1466,13 +1622,13 @@ RSpec.describe SuperDiff::EqualityMatcher do
1466
1622
  if SuperDiff::Test.jruby?
1467
1623
  # Source: <https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyBasicObject.java>
1468
1624
  colored do
1469
- alpha_line %(Expected: #<SuperDiff::Test::Item:#{SuperDiff::Test.object_id_hex(expected)} @name="camera", @quantity=3>)
1470
- beta_line %( Actual: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(actual)} @inventory=["sword"], @character="Jon", @handle="mcmire", @ultimate=true, @shields=11.4, @health=4>)
1625
+ expected_line %(Expected: #<SuperDiff::Test::Item:#{SuperDiff::Test.object_id_hex(expected)} @name="camera", @quantity=3>)
1626
+ actual_line %( Actual: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(actual)} @inventory=["sword"], @character="Jon", @handle="mcmire", @ultimate=true, @shields=11.4, @health=4>)
1471
1627
  end
1472
1628
  else
1473
1629
  colored do
1474
- alpha_line %(Expected: #<SuperDiff::Test::Item:#{SuperDiff::Test.object_id_hex(expected)} @name="camera", @quantity=3>)
1475
- beta_line %( Actual: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(actual)} @handle="mcmire", @character="Jon", @inventory=["sword"], @shields=11.4, @health=4, @ultimate=true>)
1630
+ expected_line %(Expected: #<SuperDiff::Test::Item:#{SuperDiff::Test.object_id_hex(expected)} @name="camera", @quantity=3>)
1631
+ actual_line %( Actual: #<SuperDiff::Test::Player:#{SuperDiff::Test.object_id_hex(actual)} @handle="mcmire", @character="Jon", @inventory=["sword"], @shields=11.4, @health=4, @ultimate=true>)
1476
1632
  end
1477
1633
  end
1478
1634
  }
@@ -1495,8 +1651,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1495
1651
 
1496
1652
  #{
1497
1653
  colored do
1498
- alpha_line %(Expected: ["a", ∙∙∙, "b", "c"])
1499
- beta_line %( Actual: ["a", "x", "b", "c"])
1654
+ expected_line %(Expected: ["a", ∙∙∙, "b", "c"])
1655
+ actual_line %( Actual: ["a", "x", "b", "c"])
1500
1656
  end
1501
1657
  }
1502
1658
 
@@ -1504,13 +1660,13 @@ RSpec.describe SuperDiff::EqualityMatcher do
1504
1660
 
1505
1661
  #{
1506
1662
  colored do
1507
- plain_line %( [)
1508
- plain_line %( "a",)
1509
- alpha_line %(- ∙∙∙,)
1510
- beta_line %(+ "x",)
1511
- plain_line %( "b",)
1512
- plain_line %( "c")
1513
- plain_line %( ])
1663
+ plain_line %( [)
1664
+ plain_line %( "a",)
1665
+ expected_line %(- ∙∙∙,)
1666
+ actual_line %(+ "x",)
1667
+ plain_line %( "b",)
1668
+ plain_line %( "c")
1669
+ plain_line %( ])
1514
1670
  end
1515
1671
  }
1516
1672
  STR
@@ -1532,8 +1688,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1532
1688
 
1533
1689
  #{
1534
1690
  colored do
1535
- alpha_line %(Expected: ["a", "x", "b", "c"])
1536
- beta_line %( Actual: ["a", ∙∙∙, "b", "c"])
1691
+ expected_line %(Expected: ["a", "x", "b", "c"])
1692
+ actual_line %( Actual: ["a", ∙∙∙, "b", "c"])
1537
1693
  end
1538
1694
  }
1539
1695
 
@@ -1541,13 +1697,13 @@ RSpec.describe SuperDiff::EqualityMatcher do
1541
1697
 
1542
1698
  #{
1543
1699
  colored do
1544
- plain_line %( [)
1545
- plain_line %( "a",)
1546
- alpha_line %(- "x",)
1547
- beta_line %(+ ∙∙∙,)
1548
- plain_line %( "b",)
1549
- plain_line %( "c")
1550
- plain_line %( ])
1700
+ plain_line %( [)
1701
+ plain_line %( "a",)
1702
+ expected_line %(- "x",)
1703
+ actual_line %(+ ∙∙∙,)
1704
+ plain_line %( "b",)
1705
+ plain_line %( "c")
1706
+ plain_line %( ])
1551
1707
  end
1552
1708
  }
1553
1709
  STR
@@ -1569,8 +1725,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1569
1725
 
1570
1726
  #{
1571
1727
  colored do
1572
- alpha_line %(Expected: { foo: ["a", "x", "b", "c"] })
1573
- beta_line %( Actual: { foo: ["a", ∙∙∙, "b", "c"] })
1728
+ expected_line %(Expected: { foo: ["a", "x", "b", "c"] })
1729
+ actual_line %( Actual: { foo: ["a", ∙∙∙, "b", "c"] })
1574
1730
  end
1575
1731
  }
1576
1732
 
@@ -1578,15 +1734,15 @@ RSpec.describe SuperDiff::EqualityMatcher do
1578
1734
 
1579
1735
  #{
1580
1736
  colored do
1581
- plain_line %( {)
1582
- plain_line %( foo: [)
1583
- plain_line %( "a",)
1584
- alpha_line %(- "x",)
1585
- beta_line %(+ ∙∙∙,)
1586
- plain_line %( "b",)
1587
- plain_line %( "c")
1588
- plain_line %( ])
1589
- plain_line %( })
1737
+ plain_line %( {)
1738
+ plain_line %( foo: [)
1739
+ plain_line %( "a",)
1740
+ expected_line %(- "x",)
1741
+ actual_line %(+ ∙∙∙,)
1742
+ plain_line %( "b",)
1743
+ plain_line %( "c")
1744
+ plain_line %( ])
1745
+ plain_line %( })
1590
1746
  end
1591
1747
  }
1592
1748
  STR
@@ -1608,8 +1764,8 @@ RSpec.describe SuperDiff::EqualityMatcher do
1608
1764
 
1609
1765
  #{
1610
1766
  colored do
1611
- alpha_line %(Expected: { foo: ["a", "x", "b", "c"] })
1612
- beta_line %( Actual: { foo: ["a", ∙∙∙, "b", "c"] })
1767
+ expected_line %(Expected: { foo: ["a", "x", "b", "c"] })
1768
+ actual_line %( Actual: { foo: ["a", ∙∙∙, "b", "c"] })
1613
1769
  end
1614
1770
  }
1615
1771
 
@@ -1617,15 +1773,15 @@ RSpec.describe SuperDiff::EqualityMatcher do
1617
1773
 
1618
1774
  #{
1619
1775
  colored do
1620
- plain_line %( {)
1621
- plain_line %( foo: [)
1622
- plain_line %( "a",)
1623
- alpha_line %(- "x",)
1624
- beta_line %(+ ∙∙∙,)
1625
- plain_line %( "b",)
1626
- plain_line %( "c")
1627
- plain_line %( ])
1628
- plain_line %( })
1776
+ plain_line %( {)
1777
+ plain_line %( foo: [)
1778
+ plain_line %( "a",)
1779
+ expected_line %(- "x",)
1780
+ actual_line %(+ ∙∙∙,)
1781
+ plain_line %( "b",)
1782
+ plain_line %( "c")
1783
+ plain_line %( ])
1784
+ plain_line %( })
1629
1785
  end
1630
1786
  }
1631
1787
  STR