super_diff 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of super_diff might be problematic. Click here for more details.

Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -166
  3. data/lib/super_diff/active_record/differs/active_record_relation.rb +1 -1
  4. data/lib/super_diff/active_record/inspection_tree_builders/active_record_model.rb +57 -0
  5. data/lib/super_diff/active_record/inspection_tree_builders/active_record_relation.rb +34 -0
  6. data/lib/super_diff/active_record/inspection_tree_builders.rb +14 -0
  7. data/lib/super_diff/active_record/monkey_patches.rb +6 -3
  8. data/lib/super_diff/active_record/object_inspection.rb +16 -4
  9. data/lib/super_diff/active_record/operation_tree_builders/active_record_model.rb +6 -2
  10. data/lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb +1 -1
  11. data/lib/super_diff/active_record/operation_tree_flatteners/active_record_relation.rb +1 -1
  12. data/lib/super_diff/active_record/operation_trees/active_record_relation.rb +1 -1
  13. data/lib/super_diff/active_record.rb +12 -16
  14. data/lib/super_diff/active_support/differs/hash_with_indifferent_access.rb +1 -1
  15. data/lib/super_diff/active_support/inspection_tree_builders/hash_with_indifferent_access.rb +44 -0
  16. data/lib/super_diff/active_support/inspection_tree_builders/ordered_options.rb +44 -0
  17. data/lib/super_diff/active_support/inspection_tree_builders.rb +14 -0
  18. data/lib/super_diff/active_support/object_inspection.rb +16 -4
  19. data/lib/super_diff/active_support/operation_tree_builders/hash_with_indifferent_access.rb +1 -1
  20. data/lib/super_diff/active_support/operation_tree_flatteners/hash_with_indifferent_access.rb +1 -1
  21. data/lib/super_diff/active_support/operation_trees/hash_with_indifferent_access.rb +1 -1
  22. data/lib/super_diff/active_support.rb +11 -14
  23. data/lib/super_diff/basic/diff_formatters/collection.rb +135 -0
  24. data/lib/super_diff/basic/diff_formatters/multiline_string.rb +34 -0
  25. data/lib/super_diff/basic/diff_formatters.rb +11 -0
  26. data/lib/super_diff/basic/differs/array.rb +17 -0
  27. data/lib/super_diff/basic/differs/custom_object.rb +19 -0
  28. data/lib/super_diff/basic/differs/date_like.rb +17 -0
  29. data/lib/super_diff/basic/differs/default_object.rb +24 -0
  30. data/lib/super_diff/basic/differs/hash.rb +17 -0
  31. data/lib/super_diff/basic/differs/multiline_string.rb +18 -0
  32. data/lib/super_diff/basic/differs/time_like.rb +17 -0
  33. data/lib/super_diff/basic/differs.rb +24 -0
  34. data/lib/super_diff/basic/inspection_tree_builders/array.rb +53 -0
  35. data/lib/super_diff/basic/inspection_tree_builders/custom_object.rb +41 -0
  36. data/lib/super_diff/basic/inspection_tree_builders/date_like.rb +51 -0
  37. data/lib/super_diff/basic/inspection_tree_builders/default_object.rb +77 -0
  38. data/lib/super_diff/basic/inspection_tree_builders/hash.rb +63 -0
  39. data/lib/super_diff/basic/inspection_tree_builders/primitive.rb +19 -0
  40. data/lib/super_diff/basic/inspection_tree_builders/time_like.rb +58 -0
  41. data/lib/super_diff/basic/inspection_tree_builders.rb +20 -0
  42. data/lib/super_diff/basic/operation_tree_builders/array.rb +111 -0
  43. data/lib/super_diff/basic/operation_tree_builders/custom_object.rb +42 -0
  44. data/lib/super_diff/basic/operation_tree_builders/date_like.rb +17 -0
  45. data/lib/super_diff/basic/operation_tree_builders/default_object.rb +117 -0
  46. data/lib/super_diff/basic/operation_tree_builders/hash.rb +222 -0
  47. data/lib/super_diff/basic/operation_tree_builders/multiline_string.rb +90 -0
  48. data/lib/super_diff/basic/operation_tree_builders/time_like.rb +26 -0
  49. data/lib/super_diff/basic/operation_tree_builders.rb +34 -0
  50. data/lib/super_diff/basic/operation_tree_flatteners/array.rb +17 -0
  51. data/lib/super_diff/basic/operation_tree_flatteners/collection.rb +140 -0
  52. data/lib/super_diff/basic/operation_tree_flatteners/custom_object.rb +30 -0
  53. data/lib/super_diff/basic/operation_tree_flatteners/default_object.rb +32 -0
  54. data/lib/super_diff/basic/operation_tree_flatteners/hash.rb +35 -0
  55. data/lib/super_diff/basic/operation_tree_flatteners/multiline_string.rb +20 -0
  56. data/lib/super_diff/basic/operation_tree_flatteners.rb +24 -0
  57. data/lib/super_diff/basic/operation_trees/array.rb +17 -0
  58. data/lib/super_diff/basic/operation_trees/custom_object.rb +17 -0
  59. data/lib/super_diff/basic/operation_trees/default_object.rb +42 -0
  60. data/lib/super_diff/basic/operation_trees/hash.rb +17 -0
  61. data/lib/super_diff/basic/operation_trees/multiline_string.rb +17 -0
  62. data/lib/super_diff/basic/operation_trees.rb +25 -0
  63. data/lib/super_diff/basic.rb +48 -0
  64. data/lib/super_diff/{differs/base.rb → core/abstract_differ.rb} +2 -2
  65. data/lib/super_diff/core/abstract_inspection_tree_builder.rb +26 -0
  66. data/lib/super_diff/{operation_trees/base.rb → core/abstract_operation_tree.rb} +6 -2
  67. data/lib/super_diff/{operation_tree_builders/base.rb → core/abstract_operation_tree_builder.rb} +4 -8
  68. data/lib/super_diff/{operation_tree_flatteners/base.rb → core/abstract_operation_tree_flattener.rb} +2 -2
  69. data/lib/super_diff/{operations → core}/binary_operation.rb +1 -1
  70. data/lib/super_diff/core/colorized_document_extensions.rb +20 -0
  71. data/lib/super_diff/core/configuration.rb +192 -0
  72. data/lib/super_diff/core/differ_dispatcher.rb +33 -0
  73. data/lib/super_diff/core/gem_version.rb +47 -0
  74. data/lib/super_diff/core/helpers.rb +88 -0
  75. data/lib/super_diff/core/implementation_checks.rb +21 -0
  76. data/lib/super_diff/{object_inspection → core}/inspection_tree.rb +32 -26
  77. data/lib/super_diff/core/inspection_tree_builder_dispatcher.rb +23 -0
  78. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/as_lines_when_rendering_to_lines.rb +12 -5
  79. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/as_prefix_when_rendering_to_lines.rb +3 -3
  80. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/as_prelude_when_rendering_to_lines.rb +3 -3
  81. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/as_single_line.rb +3 -3
  82. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/base.rb +2 -2
  83. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/inspection.rb +7 -11
  84. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/nesting.rb +2 -2
  85. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/only_when.rb +2 -2
  86. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/text.rb +2 -2
  87. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/when_empty.rb +2 -2
  88. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/when_non_empty.rb +2 -2
  89. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/when_rendering_to_lines.rb +2 -2
  90. data/lib/super_diff/{object_inspection/nodes → core/inspection_tree_nodes}/when_rendering_to_string.rb +2 -2
  91. data/lib/super_diff/core/inspection_tree_nodes.rb +55 -0
  92. data/lib/super_diff/core/line.rb +85 -0
  93. data/lib/super_diff/{errors → core}/no_differ_available_error.rb +1 -1
  94. data/lib/super_diff/core/no_inspection_tree_builder_available_error.rb +21 -0
  95. data/lib/super_diff/core/no_operation_tree_available_error.rb +20 -0
  96. data/lib/super_diff/{errors/no_operational_sequencer_available_error.rb → core/no_operation_tree_builder_available_error.rb} +6 -4
  97. data/lib/super_diff/{operation_tree_builders/main.rb → core/operation_tree_builder_dispatcher.rb} +9 -13
  98. data/lib/super_diff/core/operation_tree_finder.rb +27 -0
  99. data/lib/super_diff/core/prefix_for_next_inspection_tree_node.rb +6 -0
  100. data/lib/super_diff/core/prelude_for_next_inspection_tree_node.rb +6 -0
  101. data/lib/super_diff/core/recursion_guard.rb +52 -0
  102. data/lib/super_diff/core/tiered_lines.rb +6 -0
  103. data/lib/super_diff/core/tiered_lines_elider.rb +472 -0
  104. data/lib/super_diff/core/tiered_lines_formatter.rb +77 -0
  105. data/lib/super_diff/{operations → core}/unary_operation.rb +1 -1
  106. data/lib/super_diff/core.rb +69 -0
  107. data/lib/super_diff/differs.rb +19 -11
  108. data/lib/super_diff/equality_matchers/array.rb +3 -3
  109. data/lib/super_diff/equality_matchers/default.rb +8 -3
  110. data/lib/super_diff/equality_matchers/hash.rb +3 -3
  111. data/lib/super_diff/equality_matchers/multiline_string.rb +3 -3
  112. data/lib/super_diff/equality_matchers/primitive.rb +3 -3
  113. data/lib/super_diff/equality_matchers/singleline_string.rb +2 -2
  114. data/lib/super_diff/errors.rb +12 -12
  115. data/lib/super_diff/object_inspection.rb +63 -14
  116. data/lib/super_diff/operation_tree_builders.rb +19 -14
  117. data/lib/super_diff/operation_tree_flatteners.rb +19 -16
  118. data/lib/super_diff/operation_trees.rb +19 -9
  119. data/lib/super_diff/operations.rb +12 -2
  120. data/lib/super_diff/rspec/augmented_matcher.rb +1 -1
  121. data/lib/super_diff/rspec/differ.rb +4 -5
  122. data/lib/super_diff/rspec/differs/collection_containing_exactly.rb +1 -1
  123. data/lib/super_diff/rspec/differs/collection_including.rb +1 -1
  124. data/lib/super_diff/rspec/differs/hash_including.rb +1 -1
  125. data/lib/super_diff/rspec/differs/object_having_attributes.rb +1 -1
  126. data/lib/super_diff/rspec/inspection_tree_builders/collection_containing_exactly.rb +34 -0
  127. data/lib/super_diff/rspec/inspection_tree_builders/collection_including.rb +40 -0
  128. data/lib/super_diff/rspec/inspection_tree_builders/double.rb +100 -0
  129. data/lib/super_diff/rspec/inspection_tree_builders/generic_describable_matcher.rb +17 -0
  130. data/lib/super_diff/rspec/inspection_tree_builders/hash_including.rb +40 -0
  131. data/lib/super_diff/rspec/inspection_tree_builders/instance_of.rb +25 -0
  132. data/lib/super_diff/rspec/inspection_tree_builders/kind_of.rb +25 -0
  133. data/lib/super_diff/rspec/inspection_tree_builders/object_having_attributes.rb +34 -0
  134. data/lib/super_diff/rspec/inspection_tree_builders/primitive.rb +9 -0
  135. data/lib/super_diff/rspec/inspection_tree_builders/value_within.rb +30 -0
  136. data/lib/super_diff/rspec/inspection_tree_builders.rb +40 -0
  137. data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +3 -7
  138. data/lib/super_diff/rspec/monkey_patches.rb +59 -8
  139. data/lib/super_diff/rspec/object_inspection.rb +14 -4
  140. data/lib/super_diff/rspec/operation_tree_builders/collection_containing_exactly.rb +4 -4
  141. data/lib/super_diff/rspec/operation_tree_builders/collection_including.rb +1 -1
  142. data/lib/super_diff/rspec/operation_tree_builders/hash_including.rb +1 -1
  143. data/lib/super_diff/rspec/operation_tree_builders/object_having_attributes.rb +2 -2
  144. data/lib/super_diff/rspec.rb +28 -25
  145. data/lib/super_diff/version.rb +1 -1
  146. data/lib/super_diff.rb +78 -21
  147. data/spec/examples.txt +704 -493
  148. data/spec/integration/rails/engines_spec.rb +8 -3
  149. data/spec/integration/rspec/contain_exactly_matcher_spec.rb +19 -19
  150. data/spec/integration/rspec/eq_matcher_spec.rb +111 -39
  151. data/spec/integration/rspec/generic_describable_matchers_spec.rb +177 -0
  152. data/spec/integration/rspec/have_attributes_matcher_spec.rb +25 -25
  153. data/spec/integration/rspec/include_matcher_spec.rb +23 -23
  154. data/spec/integration/rspec/magic_metadata_spec.rb +51 -0
  155. data/spec/integration/rspec/match_array_matcher_spec.rb +30 -30
  156. data/spec/integration/rspec/match_matcher_spec.rb +93 -93
  157. data/spec/integration/rspec/raise_error_matcher_spec.rb +813 -69
  158. data/spec/internal/log/test.log +0 -0
  159. data/spec/spec_helper.rb +3 -0
  160. data/spec/support/integration/helpers.rb +19 -11
  161. data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +1 -1
  162. data/spec/support/integration/matchers.rb +34 -0
  163. data/spec/support/integration/test_programs/base.rb +6 -6
  164. data/spec/support/integration/test_programs/rspec_rails_engine.rb +3 -13
  165. data/spec/support/models/active_record/person.rb +8 -1
  166. data/spec/support/shared_examples/active_record.rb +38 -38
  167. data/spec/support/shared_examples/active_support.rb +125 -4
  168. data/spec/support/shared_examples/elided_diffs.rb +48 -48
  169. data/spec/support/shared_examples/hash_with_indifferent_access.rb +88 -88
  170. data/spec/support/shared_examples/key.rb +10 -10
  171. data/spec/support/unit/helpers.rb +12 -1
  172. data/spec/support/unit/matchers/be_deprecated_in_favor_of.rb +39 -0
  173. data/spec/unit/active_record/object_inspection_spec.rb +5 -5
  174. data/spec/unit/active_support/object_inspection_spec.rb +170 -0
  175. data/spec/unit/{operation_tree_flatteners → basic/operation_tree_flatteners}/array_spec.rb +8 -8
  176. data/spec/unit/{operation_tree_flatteners → basic/operation_tree_flatteners}/custom_object_spec.rb +9 -9
  177. data/spec/unit/{operation_tree_flatteners → basic/operation_tree_flatteners}/default_object_spec.rb +9 -9
  178. data/spec/unit/{operation_tree_flatteners → basic/operation_tree_flatteners}/hash_spec.rb +8 -8
  179. data/spec/unit/{operation_tree_flatteners → basic/operation_tree_flatteners}/multiline_string_spec.rb +4 -4
  180. data/spec/unit/{helpers_spec.rb → core/helpers_spec.rb} +2 -2
  181. data/spec/unit/{tiered_lines_elider_spec.rb → core/tiered_lines_elider_spec.rb} +2 -2
  182. data/spec/unit/{tiered_lines_formatter_spec.rb → core/tiered_lines_formatter_spec.rb} +1 -1
  183. data/spec/unit/deprecations_spec.rb +176 -0
  184. data/spec/unit/equality_matchers/main_spec.rb +5 -5
  185. data/spec/unit/rspec/matchers/raise_error_spec.rb +43 -11
  186. data/spec/unit/rspec/object_inspection/rspec_matcher_spec.rb +91 -0
  187. data/spec/unit/rspec/object_inspection_spec.rb +2 -2
  188. data/spec/unit/super_diff_spec.rb +64 -0
  189. data/super_diff.gemspec +6 -0
  190. metadata +137 -112
  191. data/lib/super_diff/active_record/object_inspection/inspection_tree_builders/active_record_model.rb +0 -39
  192. data/lib/super_diff/active_record/object_inspection/inspection_tree_builders/active_record_relation.rb +0 -27
  193. data/lib/super_diff/active_record/object_inspection/inspection_tree_builders.rb +0 -16
  194. data/lib/super_diff/active_support/object_inspection/inspection_tree_builders/hash_with_indifferent_access.rb +0 -31
  195. data/lib/super_diff/active_support/object_inspection/inspection_tree_builders.rb +0 -12
  196. data/lib/super_diff/colorized_document_extensions.rb +0 -18
  197. data/lib/super_diff/configuration.rb +0 -149
  198. data/lib/super_diff/diff_formatters/collection.rb +0 -132
  199. data/lib/super_diff/diff_formatters/multiline_string.rb +0 -31
  200. data/lib/super_diff/differs/array.rb +0 -15
  201. data/lib/super_diff/differs/custom_object.rb +0 -17
  202. data/lib/super_diff/differs/default_object.rb +0 -19
  203. data/lib/super_diff/differs/defaults.rb +0 -12
  204. data/lib/super_diff/differs/empty.rb +0 -13
  205. data/lib/super_diff/differs/hash.rb +0 -15
  206. data/lib/super_diff/differs/main.rb +0 -31
  207. data/lib/super_diff/differs/multiline_string.rb +0 -16
  208. data/lib/super_diff/differs/time_like.rb +0 -15
  209. data/lib/super_diff/errors/no_diff_formatter_available_error.rb +0 -21
  210. data/lib/super_diff/gem_version.rb +0 -45
  211. data/lib/super_diff/helpers.rb +0 -86
  212. data/lib/super_diff/implementation_checks.rb +0 -19
  213. data/lib/super_diff/line.rb +0 -83
  214. data/lib/super_diff/object_inspection/inspection_tree_builders/array.rb +0 -34
  215. data/lib/super_diff/object_inspection/inspection_tree_builders/base.rb +0 -27
  216. data/lib/super_diff/object_inspection/inspection_tree_builders/custom_object.rb +0 -31
  217. data/lib/super_diff/object_inspection/inspection_tree_builders/default_object.rb +0 -54
  218. data/lib/super_diff/object_inspection/inspection_tree_builders/defaults.rb +0 -14
  219. data/lib/super_diff/object_inspection/inspection_tree_builders/hash.rb +0 -38
  220. data/lib/super_diff/object_inspection/inspection_tree_builders/main.rb +0 -30
  221. data/lib/super_diff/object_inspection/inspection_tree_builders/primitive.rb +0 -21
  222. data/lib/super_diff/object_inspection/inspection_tree_builders/time_like.rb +0 -47
  223. data/lib/super_diff/object_inspection/inspection_tree_builders.rb +0 -44
  224. data/lib/super_diff/object_inspection/nodes.rb +0 -50
  225. data/lib/super_diff/object_inspection/prefix_for_next_node.rb +0 -6
  226. data/lib/super_diff/object_inspection/prelude_for_next_node.rb +0 -6
  227. data/lib/super_diff/operation_tree_builders/array.rb +0 -107
  228. data/lib/super_diff/operation_tree_builders/custom_object.rb +0 -40
  229. data/lib/super_diff/operation_tree_builders/default_object.rb +0 -119
  230. data/lib/super_diff/operation_tree_builders/defaults.rb +0 -5
  231. data/lib/super_diff/operation_tree_builders/hash.rb +0 -218
  232. data/lib/super_diff/operation_tree_builders/multiline_string.rb +0 -86
  233. data/lib/super_diff/operation_tree_builders/time_like.rb +0 -24
  234. data/lib/super_diff/operation_tree_flatteners/array.rb +0 -15
  235. data/lib/super_diff/operation_tree_flatteners/collection.rb +0 -136
  236. data/lib/super_diff/operation_tree_flatteners/custom_object.rb +0 -28
  237. data/lib/super_diff/operation_tree_flatteners/default_object.rb +0 -31
  238. data/lib/super_diff/operation_tree_flatteners/hash.rb +0 -33
  239. data/lib/super_diff/operation_tree_flatteners/multiline_string.rb +0 -18
  240. data/lib/super_diff/operation_trees/array.rb +0 -15
  241. data/lib/super_diff/operation_trees/custom_object.rb +0 -15
  242. data/lib/super_diff/operation_trees/default_object.rb +0 -40
  243. data/lib/super_diff/operation_trees/defaults.rb +0 -5
  244. data/lib/super_diff/operation_trees/hash.rb +0 -15
  245. data/lib/super_diff/operation_trees/main.rb +0 -35
  246. data/lib/super_diff/operation_trees/multiline_string.rb +0 -15
  247. data/lib/super_diff/recursion_guard.rb +0 -50
  248. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/collection_containing_exactly.rb +0 -29
  249. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/collection_including.rb +0 -36
  250. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/double.rb +0 -98
  251. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/hash_including.rb +0 -37
  252. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/instance_of.rb +0 -28
  253. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/kind_of.rb +0 -28
  254. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/object_having_attributes.rb +0 -29
  255. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/primitive.rb +0 -10
  256. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/value_within.rb +0 -33
  257. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders.rb +0 -44
  258. data/lib/super_diff/tiered_lines.rb +0 -4
  259. data/lib/super_diff/tiered_lines_elider.rb +0 -462
  260. data/lib/super_diff/tiered_lines_formatter.rb +0 -75
@@ -4,14 +4,14 @@ shared_examples_for "a matcher that supports elided diffs" do
4
4
  it "elides the unchanged sections, preserving <maximum> number of lines within all unchanged sections (including the elision marker)" do
5
5
  as_both_colored_and_uncolored do |color_enabled|
6
6
  snippet = <<~TEST.strip
7
- expected = [
7
+ actual = [
8
8
  "Afghanistan",
9
9
  "Aland Islands",
10
10
  "Albania",
11
11
  "Algeria",
12
12
  "American Samoa",
13
13
  "Andorra",
14
- "Angola",
14
+ "Anguilla",
15
15
  "Antarctica",
16
16
  "Antigua And Barbuda",
17
17
  "Argentina",
@@ -19,14 +19,14 @@ shared_examples_for "a matcher that supports elided diffs" do
19
19
  "Aruba",
20
20
  "Australia"
21
21
  ]
22
- actual = [
22
+ expected = [
23
23
  "Afghanistan",
24
24
  "Aland Islands",
25
25
  "Albania",
26
26
  "Algeria",
27
27
  "American Samoa",
28
28
  "Andorra",
29
- "Anguilla",
29
+ "Angola",
30
30
  "Antarctica",
31
31
  "Antigua And Barbuda",
32
32
  "Argentina",
@@ -40,7 +40,7 @@ shared_examples_for "a matcher that supports elided diffs" do
40
40
  make_plain_test_program(
41
41
  snippet,
42
42
  color_enabled: color_enabled,
43
- configuration: {
43
+ super_diff_configuration: {
44
44
  diff_elision_enabled: true,
45
45
  diff_elision_maximum: 3
46
46
  }
@@ -93,14 +93,14 @@ shared_examples_for "a matcher that supports elided diffs" do
93
93
  it "does not elide anything" do
94
94
  as_both_colored_and_uncolored do |color_enabled|
95
95
  snippet = <<~TEST.strip
96
- expected = [
96
+ actual = [
97
97
  "Afghanistan",
98
98
  "Aland Islands",
99
99
  "Albania",
100
100
  "Algeria",
101
101
  "American Samoa",
102
102
  "Andorra",
103
- "Angola",
103
+ "Anguilla",
104
104
  "Antarctica",
105
105
  "Antigua And Barbuda",
106
106
  "Argentina",
@@ -108,14 +108,14 @@ shared_examples_for "a matcher that supports elided diffs" do
108
108
  "Aruba",
109
109
  "Australia"
110
110
  ]
111
- actual = [
111
+ expected = [
112
112
  "Afghanistan",
113
113
  "Aland Islands",
114
114
  "Albania",
115
115
  "Algeria",
116
116
  "American Samoa",
117
117
  "Andorra",
118
- "Anguilla",
118
+ "Angola",
119
119
  "Antarctica",
120
120
  "Antigua And Barbuda",
121
121
  "Argentina",
@@ -129,7 +129,7 @@ shared_examples_for "a matcher that supports elided diffs" do
129
129
  make_plain_test_program(
130
130
  snippet,
131
131
  color_enabled: color_enabled,
132
- configuration: {
132
+ super_diff_configuration: {
133
133
  diff_elision_enabled: false,
134
134
  diff_elision_maximum: 3
135
135
  }
@@ -190,8 +190,8 @@ shared_examples_for "a matcher that supports elided diffs" do
190
190
  it "elides the unchanged sections, preserving <maximum> number of lines within all unchanged sections (including the elision marker)" do
191
191
  as_both_colored_and_uncolored do |color_enabled|
192
192
  snippet = <<~TEST.strip
193
- expected = [
194
- "Afghanistan",
193
+ actual = [
194
+ "Zambia",
195
195
  "Aland Islands",
196
196
  "Albania",
197
197
  "Algeria",
@@ -204,10 +204,10 @@ shared_examples_for "a matcher that supports elided diffs" do
204
204
  "Argentina",
205
205
  "Armenia",
206
206
  "Aruba",
207
- "Australia"
207
+ "Zimbabwe"
208
208
  ]
209
- actual = [
210
- "Zambia",
209
+ expected = [
210
+ "Afghanistan",
211
211
  "Aland Islands",
212
212
  "Albania",
213
213
  "Algeria",
@@ -220,7 +220,7 @@ shared_examples_for "a matcher that supports elided diffs" do
220
220
  "Argentina",
221
221
  "Armenia",
222
222
  "Aruba",
223
- "Zimbabwe"
223
+ "Australia"
224
224
  ]
225
225
  expect(actual).to #{matcher}(expected)
226
226
  TEST
@@ -228,7 +228,7 @@ shared_examples_for "a matcher that supports elided diffs" do
228
228
  make_plain_test_program(
229
229
  snippet,
230
230
  color_enabled: color_enabled,
231
- configuration: {
231
+ super_diff_configuration: {
232
232
  diff_elision_enabled: true,
233
233
  diff_elision_maximum: 3
234
234
  }
@@ -280,8 +280,8 @@ shared_examples_for "a matcher that supports elided diffs" do
280
280
  it "does not elide anything" do
281
281
  as_both_colored_and_uncolored do |color_enabled|
282
282
  snippet = <<~TEST.strip
283
- expected = [
284
- "Afghanistan",
283
+ actual = [
284
+ "Zambia",
285
285
  "Aland Islands",
286
286
  "Albania",
287
287
  "Algeria",
@@ -294,10 +294,10 @@ shared_examples_for "a matcher that supports elided diffs" do
294
294
  "Argentina",
295
295
  "Armenia",
296
296
  "Aruba",
297
- "Australia"
297
+ "Zimbabwe"
298
298
  ]
299
- actual = [
300
- "Zambia",
299
+ expected = [
300
+ "Afghanistan",
301
301
  "Aland Islands",
302
302
  "Albania",
303
303
  "Algeria",
@@ -310,7 +310,7 @@ shared_examples_for "a matcher that supports elided diffs" do
310
310
  "Argentina",
311
311
  "Armenia",
312
312
  "Aruba",
313
- "Zimbabwe"
313
+ "Australia"
314
314
  ]
315
315
  expect(actual).to #{matcher}(expected)
316
316
  TEST
@@ -318,7 +318,7 @@ shared_examples_for "a matcher that supports elided diffs" do
318
318
  make_plain_test_program(
319
319
  snippet,
320
320
  color_enabled: color_enabled,
321
- configuration: {
321
+ super_diff_configuration: {
322
322
  diff_elision_enabled: false,
323
323
  diff_elision_maximum: 3
324
324
  }
@@ -383,7 +383,7 @@ shared_examples_for "a matcher that supports elided diffs" do
383
383
  # totally weird
384
384
  as_both_colored_and_uncolored do |color_enabled|
385
385
  snippet = <<~TEST.strip
386
- expected = [
386
+ actual = [
387
387
  {
388
388
  "user_id": "18949452",
389
389
  "user": {
@@ -391,6 +391,7 @@ shared_examples_for "a matcher that supports elided diffs" do
391
391
  "name": "Financial Times",
392
392
  "screen_name": "FT",
393
393
  "location": "London",
394
+ "url": "http://t.co/dnhLQpd9BY",
394
395
  "entities": {
395
396
  "url": {
396
397
  "urls": [
@@ -409,7 +410,7 @@ shared_examples_for "a matcher that supports elided diffs" do
409
410
  "urls": [
410
411
  {
411
412
  "url": "https://t.co/5BsmLs9y1Z",
412
- "expanded_url": "http://FT.com",
413
+ "display_url": "FT.com",
413
414
  "indices": [
414
415
  65,
415
416
  88
@@ -418,6 +419,7 @@ shared_examples_for "a matcher that supports elided diffs" do
418
419
  ]
419
420
  }
420
421
  },
422
+ "protected": false,
421
423
  "listed_count": 37009,
422
424
  "created_at": "Tue Jan 13 19:28:24 +0000 2009",
423
425
  "favourites_count": 38,
@@ -431,9 +433,7 @@ shared_examples_for "a matcher that supports elided diffs" do
431
433
  "is_translator": false,
432
434
  "is_translation_enabled": false,
433
435
  "profile_background_color": "FFF1E0",
434
- "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
435
- "profile_background_tile": false,
436
- "profile_image_url": "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
436
+ "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
437
437
  "profile_image_url_https": "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
438
438
  "profile_banner_url": "https://pbs.twimg.com/profile_banners/18949452/1581526592",
439
439
  "profile_image_extensions": {
@@ -449,7 +449,6 @@ shared_examples_for "a matcher that supports elided diffs" do
449
449
  "blocked_by": false,
450
450
  "want_retweets": false,
451
451
  "advertiser_account_type": "none",
452
- "advertiser_account_service_levels": [],
453
452
  "profile_interstitial_type": "",
454
453
  "business_profile_state": "none",
455
454
  "translator_type": "none",
@@ -464,7 +463,7 @@ shared_examples_for "a matcher that supports elided diffs" do
464
463
  "token": "117"
465
464
  }
466
465
  ]
467
- actual = [
466
+ expected = [
468
467
  {
469
468
  "user_id": "18949452",
470
469
  "user": {
@@ -472,7 +471,6 @@ shared_examples_for "a matcher that supports elided diffs" do
472
471
  "name": "Financial Times",
473
472
  "screen_name": "FT",
474
473
  "location": "London",
475
- "url": "http://t.co/dnhLQpd9BY",
476
474
  "entities": {
477
475
  "url": {
478
476
  "urls": [
@@ -491,7 +489,7 @@ shared_examples_for "a matcher that supports elided diffs" do
491
489
  "urls": [
492
490
  {
493
491
  "url": "https://t.co/5BsmLs9y1Z",
494
- "display_url": "FT.com",
492
+ "expanded_url": "http://FT.com",
495
493
  "indices": [
496
494
  65,
497
495
  88
@@ -500,7 +498,6 @@ shared_examples_for "a matcher that supports elided diffs" do
500
498
  ]
501
499
  }
502
500
  },
503
- "protected": false,
504
501
  "listed_count": 37009,
505
502
  "created_at": "Tue Jan 13 19:28:24 +0000 2009",
506
503
  "favourites_count": 38,
@@ -514,7 +511,9 @@ shared_examples_for "a matcher that supports elided diffs" do
514
511
  "is_translator": false,
515
512
  "is_translation_enabled": false,
516
513
  "profile_background_color": "FFF1E0",
517
- "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
514
+ "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
515
+ "profile_background_tile": false,
516
+ "profile_image_url": "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
518
517
  "profile_image_url_https": "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
519
518
  "profile_banner_url": "https://pbs.twimg.com/profile_banners/18949452/1581526592",
520
519
  "profile_image_extensions": {
@@ -530,6 +529,7 @@ shared_examples_for "a matcher that supports elided diffs" do
530
529
  "blocked_by": false,
531
530
  "want_retweets": false,
532
531
  "advertiser_account_type": "none",
532
+ "advertiser_account_service_levels": [],
533
533
  "profile_interstitial_type": "",
534
534
  "business_profile_state": "none",
535
535
  "translator_type": "none",
@@ -550,7 +550,7 @@ shared_examples_for "a matcher that supports elided diffs" do
550
550
  make_plain_test_program(
551
551
  snippet,
552
552
  color_enabled: color_enabled,
553
- configuration: {
553
+ super_diff_configuration: {
554
554
  diff_elision_enabled: true,
555
555
  diff_elision_maximum: 10
556
556
  }
@@ -644,7 +644,7 @@ shared_examples_for "a matcher that supports elided diffs" do
644
644
  it "does not elide anything" do
645
645
  as_both_colored_and_uncolored do |color_enabled|
646
646
  snippet = <<~TEST.strip
647
- expected = [
647
+ actual = [
648
648
  {
649
649
  "user_id": "18949452",
650
650
  "user": {
@@ -652,6 +652,7 @@ shared_examples_for "a matcher that supports elided diffs" do
652
652
  "name": "Financial Times",
653
653
  "screen_name": "FT",
654
654
  "location": "London",
655
+ "url": "http://t.co/dnhLQpd9BY",
655
656
  "entities": {
656
657
  "url": {
657
658
  "urls": [
@@ -670,7 +671,7 @@ shared_examples_for "a matcher that supports elided diffs" do
670
671
  "urls": [
671
672
  {
672
673
  "url": "https://t.co/5BsmLs9y1Z",
673
- "expanded_url": "http://FT.com",
674
+ "display_url": "FT.com",
674
675
  "indices": [
675
676
  65,
676
677
  88
@@ -679,6 +680,7 @@ shared_examples_for "a matcher that supports elided diffs" do
679
680
  ]
680
681
  }
681
682
  },
683
+ "protected": false,
682
684
  "listed_count": 37009,
683
685
  "created_at": "Tue Jan 13 19:28:24 +0000 2009",
684
686
  "favourites_count": 38,
@@ -692,9 +694,7 @@ shared_examples_for "a matcher that supports elided diffs" do
692
694
  "is_translator": false,
693
695
  "is_translation_enabled": false,
694
696
  "profile_background_color": "FFF1E0",
695
- "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
696
- "profile_background_tile": false,
697
- "profile_image_url": "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
697
+ "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
698
698
  "profile_image_url_https": "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
699
699
  "profile_banner_url": "https://pbs.twimg.com/profile_banners/18949452/1581526592",
700
700
  "profile_image_extensions": {
@@ -710,7 +710,6 @@ shared_examples_for "a matcher that supports elided diffs" do
710
710
  "blocked_by": false,
711
711
  "want_retweets": false,
712
712
  "advertiser_account_type": "none",
713
- "advertiser_account_service_levels": [],
714
713
  "profile_interstitial_type": "",
715
714
  "business_profile_state": "none",
716
715
  "translator_type": "none",
@@ -725,7 +724,7 @@ shared_examples_for "a matcher that supports elided diffs" do
725
724
  "token": "117"
726
725
  }
727
726
  ]
728
- actual = [
727
+ expected = [
729
728
  {
730
729
  "user_id": "18949452",
731
730
  "user": {
@@ -733,7 +732,6 @@ shared_examples_for "a matcher that supports elided diffs" do
733
732
  "name": "Financial Times",
734
733
  "screen_name": "FT",
735
734
  "location": "London",
736
- "url": "http://t.co/dnhLQpd9BY",
737
735
  "entities": {
738
736
  "url": {
739
737
  "urls": [
@@ -752,7 +750,7 @@ shared_examples_for "a matcher that supports elided diffs" do
752
750
  "urls": [
753
751
  {
754
752
  "url": "https://t.co/5BsmLs9y1Z",
755
- "display_url": "FT.com",
753
+ "expanded_url": "http://FT.com",
756
754
  "indices": [
757
755
  65,
758
756
  88
@@ -761,7 +759,6 @@ shared_examples_for "a matcher that supports elided diffs" do
761
759
  ]
762
760
  }
763
761
  },
764
- "protected": false,
765
762
  "listed_count": 37009,
766
763
  "created_at": "Tue Jan 13 19:28:24 +0000 2009",
767
764
  "favourites_count": 38,
@@ -775,7 +772,9 @@ shared_examples_for "a matcher that supports elided diffs" do
775
772
  "is_translator": false,
776
773
  "is_translation_enabled": false,
777
774
  "profile_background_color": "FFF1E0",
778
- "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
775
+ "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
776
+ "profile_background_tile": false,
777
+ "profile_image_url": "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
779
778
  "profile_image_url_https": "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",
780
779
  "profile_banner_url": "https://pbs.twimg.com/profile_banners/18949452/1581526592",
781
780
  "profile_image_extensions": {
@@ -791,6 +790,7 @@ shared_examples_for "a matcher that supports elided diffs" do
791
790
  "blocked_by": false,
792
791
  "want_retweets": false,
793
792
  "advertiser_account_type": "none",
793
+ "advertiser_account_service_levels": [],
794
794
  "profile_interstitial_type": "",
795
795
  "business_profile_state": "none",
796
796
  "translator_type": "none",
@@ -811,7 +811,7 @@ shared_examples_for "a matcher that supports elided diffs" do
811
811
  make_plain_test_program(
812
812
  snippet,
813
813
  color_enabled: color_enabled,
814
- configuration: {
814
+ super_diff_configuration: {
815
815
  diff_elision_enabled: false,
816
816
  diff_elision_maximum: 10
817
817
  }