super_diff 0.4.0 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +104 -73
  3. data/lib/super_diff.rb +20 -11
  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/configuration.rb +60 -0
  23. data/lib/super_diff/diff_formatters.rb +3 -3
  24. data/lib/super_diff/diff_formatters/array.rb +3 -3
  25. data/lib/super_diff/diff_formatters/base.rb +3 -2
  26. data/lib/super_diff/diff_formatters/collection.rb +2 -2
  27. data/lib/super_diff/diff_formatters/custom_object.rb +3 -3
  28. data/lib/super_diff/diff_formatters/default_object.rb +6 -8
  29. data/lib/super_diff/diff_formatters/defaults.rb +10 -0
  30. data/lib/super_diff/diff_formatters/hash.rb +3 -3
  31. data/lib/super_diff/diff_formatters/main.rb +41 -0
  32. data/lib/super_diff/diff_formatters/multiline_string.rb +3 -3
  33. data/lib/super_diff/differs.rb +4 -11
  34. data/lib/super_diff/differs/array.rb +2 -11
  35. data/lib/super_diff/differs/base.rb +20 -3
  36. data/lib/super_diff/differs/custom_object.rb +2 -11
  37. data/lib/super_diff/differs/default_object.rb +2 -8
  38. data/lib/super_diff/differs/defaults.rb +12 -0
  39. data/lib/super_diff/differs/hash.rb +2 -11
  40. data/lib/super_diff/differs/main.rb +48 -0
  41. data/lib/super_diff/differs/multiline_string.rb +2 -14
  42. data/lib/super_diff/differs/time_like.rb +15 -0
  43. data/lib/super_diff/equality_matchers.rb +3 -9
  44. data/lib/super_diff/equality_matchers/array.rb +1 -7
  45. data/lib/super_diff/equality_matchers/base.rb +1 -1
  46. data/lib/super_diff/equality_matchers/default.rb +1 -7
  47. data/lib/super_diff/equality_matchers/defaults.rb +12 -0
  48. data/lib/super_diff/equality_matchers/hash.rb +1 -7
  49. data/lib/super_diff/equality_matchers/main.rb +21 -0
  50. data/lib/super_diff/equality_matchers/multiline_string.rb +1 -7
  51. data/lib/super_diff/errors.rb +16 -0
  52. data/lib/super_diff/errors/no_diff_formatter_available_error.rb +21 -0
  53. data/lib/super_diff/errors/no_differ_available_error.rb +24 -0
  54. data/lib/super_diff/errors/no_operational_sequencer_available_error.rb +22 -0
  55. data/lib/super_diff/implementation_checks.rb +19 -0
  56. data/lib/super_diff/object_inspection.rb +1 -10
  57. data/lib/super_diff/object_inspection/inspection_tree.rb +6 -2
  58. data/lib/super_diff/object_inspection/inspectors.rb +5 -1
  59. data/lib/super_diff/object_inspection/inspectors/array.rb +20 -10
  60. data/lib/super_diff/object_inspection/inspectors/base.rb +36 -0
  61. data/lib/super_diff/object_inspection/inspectors/custom_object.rb +24 -14
  62. data/lib/super_diff/object_inspection/inspectors/default_object.rb +44 -30
  63. data/lib/super_diff/object_inspection/inspectors/defaults.rb +15 -0
  64. data/lib/super_diff/object_inspection/inspectors/hash.rb +20 -10
  65. data/lib/super_diff/object_inspection/inspectors/main.rb +35 -0
  66. data/lib/super_diff/object_inspection/inspectors/primitive.rb +20 -5
  67. data/lib/super_diff/object_inspection/inspectors/string.rb +15 -5
  68. data/lib/super_diff/object_inspection/inspectors/time_like.rb +23 -0
  69. data/lib/super_diff/object_inspection/nodes/inspection.rb +9 -2
  70. data/lib/super_diff/operation_tree_builders.rb +18 -0
  71. data/lib/super_diff/{operational_sequencers → operation_tree_builders}/array.rb +38 -59
  72. data/lib/super_diff/operation_tree_builders/base.rb +98 -0
  73. data/lib/super_diff/{operational_sequencers → operation_tree_builders}/custom_object.rb +3 -3
  74. data/lib/super_diff/{operational_sequencers → operation_tree_builders}/default_object.rb +8 -3
  75. data/lib/super_diff/operation_tree_builders/defaults.rb +5 -0
  76. data/lib/super_diff/operation_tree_builders/hash.rb +226 -0
  77. data/lib/super_diff/operation_tree_builders/main.rb +42 -0
  78. data/lib/super_diff/{operational_sequencers → operation_tree_builders}/multiline_string.rb +3 -3
  79. data/lib/super_diff/operation_tree_builders/time_like.rb +34 -0
  80. data/lib/super_diff/operation_trees.rb +13 -0
  81. data/lib/super_diff/{operation_sequences → operation_trees}/array.rb +5 -1
  82. data/lib/super_diff/{operation_sequences → operation_trees}/base.rb +9 -1
  83. data/lib/super_diff/{operation_sequences → operation_trees}/custom_object.rb +5 -1
  84. data/lib/super_diff/{operation_sequences → operation_trees}/default_object.rb +10 -8
  85. data/lib/super_diff/operation_trees/defaults.rb +5 -0
  86. data/lib/super_diff/{operation_sequences → operation_trees}/hash.rb +5 -1
  87. data/lib/super_diff/operation_trees/main.rb +35 -0
  88. data/lib/super_diff/operation_trees/multiline_string.rb +18 -0
  89. data/lib/super_diff/operations/unary_operation.rb +3 -0
  90. data/lib/super_diff/recursion_guard.rb +2 -0
  91. data/lib/super_diff/rspec.rb +45 -13
  92. data/lib/super_diff/rspec/augmented_matcher.rb +1 -1
  93. data/lib/super_diff/rspec/differ.rb +2 -17
  94. data/lib/super_diff/rspec/differs/collection_containing_exactly.rb +2 -7
  95. data/lib/super_diff/rspec/differs/collection_including.rb +2 -7
  96. data/lib/super_diff/rspec/differs/hash_including.rb +2 -7
  97. data/lib/super_diff/rspec/differs/object_having_attributes.rb +2 -7
  98. data/lib/super_diff/rspec/matcher_text_builders/match.rb +1 -1
  99. data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +1 -1
  100. data/lib/super_diff/rspec/matcher_text_template.rb +1 -1
  101. data/lib/super_diff/rspec/monkey_patches.rb +9 -5
  102. data/lib/super_diff/rspec/object_inspection.rb +0 -1
  103. data/lib/super_diff/rspec/object_inspection/inspectors.rb +16 -0
  104. data/lib/super_diff/rspec/object_inspection/inspectors/collection_containing_exactly.rb +17 -8
  105. data/lib/super_diff/rspec/object_inspection/inspectors/collection_including.rb +15 -9
  106. data/lib/super_diff/rspec/object_inspection/inspectors/hash_including.rb +20 -10
  107. data/lib/super_diff/rspec/object_inspection/inspectors/instance_of.rb +23 -0
  108. data/lib/super_diff/rspec/object_inspection/inspectors/kind_of.rb +23 -0
  109. data/lib/super_diff/rspec/object_inspection/inspectors/object_having_attributes.rb +20 -11
  110. data/lib/super_diff/rspec/object_inspection/inspectors/primitive.rb +13 -0
  111. data/lib/super_diff/rspec/object_inspection/inspectors/value_within.rb +29 -0
  112. data/lib/super_diff/rspec/operation_tree_builders.rb +22 -0
  113. data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/collection_containing_exactly.rb +5 -5
  114. data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/collection_including.rb +2 -2
  115. data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/hash_including.rb +3 -11
  116. data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/object_having_attributes.rb +4 -8
  117. data/lib/super_diff/version.rb +1 -1
  118. data/spec/examples.txt +5 -0
  119. data/spec/integration/rspec/have_attributes_matcher_spec.rb +354 -227
  120. data/spec/integration/rspec/include_matcher_spec.rb +2 -2
  121. data/spec/integration/rspec/unhandled_errors_spec.rb +81 -4
  122. data/spec/support/command_runner.rb +3 -0
  123. data/spec/support/integration/helpers.rb +12 -96
  124. data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +14 -29
  125. data/spec/support/integration/test_programs/base.rb +120 -0
  126. data/spec/support/integration/test_programs/plain.rb +13 -0
  127. data/spec/support/integration/test_programs/rspec_active_record.rb +17 -0
  128. data/spec/support/integration/test_programs/rspec_rails.rb +17 -0
  129. data/spec/support/models/active_record/person.rb +4 -11
  130. data/spec/support/models/active_record/shipping_address.rb +10 -14
  131. data/spec/support/object_id.rb +6 -5
  132. data/spec/support/shared_examples/hash_with_indifferent_access.rb +724 -208
  133. data/spec/unit/{equality_matcher_spec.rb → equality_matchers/main_spec.rb} +157 -1
  134. data/spec/unit/object_inspection_spec.rb +77 -1
  135. data/spec/unit/rspec/matchers/raise_error_spec.rb +16 -0
  136. data/super_diff.gemspec +4 -5
  137. metadata +77 -56
  138. data/lib/super_diff/active_record/object_inspection/map_extension.rb +0 -18
  139. data/lib/super_diff/active_record/operational_sequencers.rb +0 -14
  140. data/lib/super_diff/active_support/object_inspection/map_extension.rb +0 -15
  141. data/lib/super_diff/active_support/operational_sequencers.rb +0 -10
  142. data/lib/super_diff/diff_formatter.rb +0 -32
  143. data/lib/super_diff/differ.rb +0 -51
  144. data/lib/super_diff/differs/time.rb +0 -24
  145. data/lib/super_diff/equality_matcher.rb +0 -32
  146. data/lib/super_diff/no_differ_available_error.rb +0 -22
  147. data/lib/super_diff/no_operational_sequencer_available_error.rb +0 -20
  148. data/lib/super_diff/object_inspection/inspector.rb +0 -27
  149. data/lib/super_diff/object_inspection/inspectors/time.rb +0 -13
  150. data/lib/super_diff/object_inspection/map.rb +0 -30
  151. data/lib/super_diff/operation_sequences.rb +0 -9
  152. data/lib/super_diff/operational_sequencer.rb +0 -48
  153. data/lib/super_diff/operational_sequencers.rb +0 -17
  154. data/lib/super_diff/operational_sequencers/base.rb +0 -89
  155. data/lib/super_diff/operational_sequencers/hash.rb +0 -85
  156. data/lib/super_diff/operational_sequencers/time_like.rb +0 -30
  157. data/lib/super_diff/rspec/configuration.rb +0 -31
  158. data/lib/super_diff/rspec/object_inspection/map_extension.rb +0 -23
  159. data/lib/super_diff/rspec/operational_sequencers.rb +0 -22
@@ -0,0 +1,10 @@
1
+ module SuperDiff
2
+ module DiffFormatters
3
+ DEFAULTS = [
4
+ Array,
5
+ Hash,
6
+ CustomObject,
7
+ DefaultObject,
8
+ ].freeze
9
+ end
10
+ end
@@ -1,8 +1,8 @@
1
1
  module SuperDiff
2
2
  module DiffFormatters
3
3
  class Hash < Base
4
- def self.applies_to?(operations)
5
- operations.is_a?(OperationSequences::Hash)
4
+ def self.applies_to?(operation_tree)
5
+ operation_tree.is_a?(OperationTrees::Hash)
6
6
  end
7
7
 
8
8
  def call
@@ -24,7 +24,7 @@ module SuperDiff
24
24
  "#{key.inspect} => "
25
25
  end
26
26
  },
27
- operations: operations,
27
+ operation_tree: operation_tree,
28
28
  indent_level: indent_level,
29
29
  add_comma: add_comma?,
30
30
  )
@@ -0,0 +1,41 @@
1
+ module SuperDiff
2
+ module DiffFormatters
3
+ class Main
4
+ extend AttrExtras.mixin
5
+
6
+ method_object(
7
+ :operation_tree,
8
+ [
9
+ :indent_level!,
10
+ add_comma: false,
11
+ value_class: nil,
12
+ ],
13
+ )
14
+
15
+ def call
16
+ if resolved_class
17
+ resolved_class.call(
18
+ operation_tree,
19
+ indent_level: indent_level,
20
+ add_comma: add_comma?,
21
+ value_class: value_class,
22
+ )
23
+ else
24
+ raise NoDiffFormatterAvailableError.create(operation_tree)
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ attr_query :add_comma?
31
+
32
+ def resolved_class
33
+ available_classes.find { |klass| klass.applies_to?(operation_tree) }
34
+ end
35
+
36
+ def available_classes
37
+ DEFAULTS + SuperDiff.configuration.extra_diff_formatter_classes
38
+ end
39
+ end
40
+ end
41
+ end
@@ -1,8 +1,8 @@
1
1
  module SuperDiff
2
2
  module DiffFormatters
3
3
  class MultilineString < Base
4
- def self.applies_to?(operations)
5
- operations.is_a?(OperationSequences::MultilineString)
4
+ def self.applies_to?(operation_tree)
5
+ operation_tree.is_a?(OperationTrees::MultilineString)
6
6
  end
7
7
 
8
8
  def call
@@ -12,7 +12,7 @@ module SuperDiff
12
12
  private
13
13
 
14
14
  def lines
15
- operations.reduce([]) do |array, operation|
15
+ operation_tree.reduce([]) do |array, operation|
16
16
  case operation.name
17
17
  when :change
18
18
  array << Helpers.style(:alpha, "- #{operation.left_value}")
@@ -6,17 +6,10 @@ module SuperDiff
6
6
  autoload :DefaultObject, "super_diff/differs/default_object"
7
7
  autoload :Empty, "super_diff/differs/empty"
8
8
  autoload :Hash, "super_diff/differs/hash"
9
+ autoload :Main, "super_diff/differs/main"
9
10
  autoload :MultilineString, "super_diff/differs/multiline_string"
10
- autoload :Time, "super_diff/differs/time"
11
-
12
- DEFAULTS = [
13
- Array,
14
- Hash,
15
- Time,
16
- MultilineString,
17
- CustomObject,
18
- DefaultObject,
19
- Empty,
20
- ].freeze
11
+ autoload :TimeLike, "super_diff/differs/time_like"
21
12
  end
22
13
  end
14
+
15
+ require "super_diff/differs/defaults"
@@ -5,19 +5,10 @@ module SuperDiff
5
5
  expected.is_a?(::Array) && actual.is_a?(::Array)
6
6
  end
7
7
 
8
- def call
9
- DiffFormatters::Array.call(operations, indent_level: indent_level)
10
- end
11
-
12
8
  private
13
9
 
14
- def operations
15
- OperationalSequencers::Array.call(
16
- expected: expected,
17
- actual: actual,
18
- extra_operational_sequencer_classes: extra_operational_sequencer_classes,
19
- extra_diff_formatter_classes: extra_diff_formatter_classes,
20
- )
10
+ def operation_tree_builder_class
11
+ OperationTreeBuilders::Array
21
12
  end
22
13
  end
23
14
  end
@@ -5,7 +5,9 @@ module SuperDiff
5
5
  raise NotImplementedError
6
6
  end
7
7
 
8
+ extend ImplementationChecks
8
9
  extend AttrExtras.mixin
10
+ include ImplementationChecks
9
11
 
10
12
  method_object(
11
13
  :expected,
@@ -13,13 +15,15 @@ module SuperDiff
13
15
  [
14
16
  :indent_level!,
15
17
  index_in_collection: nil,
16
- extra_operational_sequencer_classes: [],
17
- extra_diff_formatter_classes: [],
18
18
  ],
19
19
  )
20
20
 
21
21
  def call
22
- raise NotImplementedError
22
+ operation_tree.to_diff(
23
+ indent_level: indent_level,
24
+ collection_prefix: nil,
25
+ add_comma: false,
26
+ )
23
27
  end
24
28
 
25
29
  protected
@@ -27,6 +31,19 @@ module SuperDiff
27
31
  def indentation
28
32
  " " * (indent_level * 2)
29
33
  end
34
+
35
+ def operation_tree_builder_class
36
+ unimplemented_instance_method!
37
+ end
38
+
39
+ private
40
+
41
+ def operation_tree
42
+ operation_tree_builder_class.call(
43
+ expected: expected,
44
+ actual: actual,
45
+ )
46
+ end
30
47
  end
31
48
  end
32
49
  end
@@ -7,19 +7,10 @@ module SuperDiff
7
7
  actual.respond_to?(:attributes_for_super_diff)
8
8
  end
9
9
 
10
- def call
11
- operations.to_diff(indent_level: indent_level)
12
- end
13
-
14
10
  private
15
11
 
16
- def operations
17
- OperationalSequencers::CustomObject.call(
18
- expected: expected,
19
- actual: actual,
20
- extra_operational_sequencer_classes: extra_operational_sequencer_classes,
21
- extra_diff_formatter_classes: extra_diff_formatter_classes,
22
- )
12
+ def operation_tree_builder_class
13
+ OperationTreeBuilders::CustomObject
23
14
  end
24
15
  end
25
16
  end
@@ -5,19 +5,13 @@ module SuperDiff
5
5
  expected.class == actual.class
6
6
  end
7
7
 
8
- def call
9
- operations.to_diff(indent_level: indent_level)
10
- end
11
-
12
8
  private
13
9
 
14
- def operations
15
- OperationalSequencer.call(
10
+ def operation_tree
11
+ OperationTreeBuilders::Main.call(
16
12
  expected: expected,
17
13
  actual: actual,
18
14
  all_or_nothing: true,
19
- extra_classes: extra_operational_sequencer_classes,
20
- extra_diff_formatter_classes: extra_diff_formatter_classes,
21
15
  )
22
16
  end
23
17
  end
@@ -0,0 +1,12 @@
1
+ module SuperDiff
2
+ module Differs
3
+ DEFAULTS = [
4
+ Array,
5
+ Hash,
6
+ TimeLike,
7
+ MultilineString,
8
+ CustomObject,
9
+ DefaultObject,
10
+ ].freeze
11
+ end
12
+ end
@@ -5,19 +5,10 @@ module SuperDiff
5
5
  expected.is_a?(::Hash) && actual.is_a?(::Hash)
6
6
  end
7
7
 
8
- def call
9
- DiffFormatters::Hash.call(operations, indent_level: indent_level)
10
- end
11
-
12
8
  private
13
9
 
14
- def operations
15
- OperationalSequencers::Hash.call(
16
- expected: expected,
17
- actual: actual,
18
- extra_operational_sequencer_classes: extra_operational_sequencer_classes,
19
- extra_diff_formatter_classes: extra_diff_formatter_classes,
20
- )
10
+ def operation_tree_builder_class
11
+ OperationTreeBuilders::Hash
21
12
  end
22
13
  end
23
14
  end
@@ -0,0 +1,48 @@
1
+ module SuperDiff
2
+ module Differs
3
+ class Main
4
+ extend AttrExtras.mixin
5
+
6
+ method_object(
7
+ :expected,
8
+ :actual,
9
+ [
10
+ indent_level: 0,
11
+ index_in_collection: nil,
12
+ omit_empty: false,
13
+ ],
14
+ )
15
+
16
+ def call
17
+ if resolved_class
18
+ resolved_class.call(
19
+ expected,
20
+ actual,
21
+ indent_level: indent_level,
22
+ index_in_collection: index_in_collection,
23
+ )
24
+ else
25
+ raise Errors::NoDifferAvailableError.create(expected, actual)
26
+ end
27
+ end
28
+
29
+ private
30
+
31
+ attr_query :omit_empty?
32
+
33
+ def resolved_class
34
+ available_classes.find { |klass| klass.applies_to?(expected, actual) }
35
+ end
36
+
37
+ def available_classes
38
+ classes = SuperDiff.configuration.extra_differ_classes + DEFAULTS
39
+
40
+ if omit_empty?
41
+ classes
42
+ else
43
+ classes + [Empty]
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -6,22 +6,10 @@ module SuperDiff
6
6
  (expected.include?("\n") || actual.include?("\n"))
7
7
  end
8
8
 
9
- def call
10
- DiffFormatters::MultilineString.call(
11
- operations,
12
- indent_level: indent_level,
13
- )
14
- end
15
-
16
9
  private
17
10
 
18
- def operations
19
- OperationalSequencers::MultilineString.call(
20
- expected: expected,
21
- actual: actual,
22
- extra_operational_sequencer_classes: extra_operational_sequencer_classes,
23
- extra_diff_formatter_classes: extra_diff_formatter_classes,
24
- )
11
+ def operation_tree_builder_class
12
+ OperationTreeBuilders::MultilineString
25
13
  end
26
14
  end
27
15
  end
@@ -0,0 +1,15 @@
1
+ module SuperDiff
2
+ module Differs
3
+ class TimeLike < Base
4
+ def self.applies_to?(expected, actual)
5
+ SuperDiff.time_like?(expected) && SuperDiff.time_like?(actual)
6
+ end
7
+
8
+ private
9
+
10
+ def operation_tree_builder_class
11
+ OperationTreeBuilders::TimeLike
12
+ end
13
+ end
14
+ end
15
+ end
@@ -3,6 +3,7 @@ module SuperDiff
3
3
  autoload :Array, "super_diff/equality_matchers/array"
4
4
  autoload :Base, "super_diff/equality_matchers/base"
5
5
  autoload :Hash, "super_diff/equality_matchers/hash"
6
+ autoload :Main, "super_diff/equality_matchers/main"
6
7
  autoload :MultilineString, "super_diff/equality_matchers/multiline_string"
7
8
  autoload :Default, "super_diff/equality_matchers/default"
8
9
  autoload :Primitive, "super_diff/equality_matchers/primitive"
@@ -10,14 +11,7 @@ module SuperDiff
10
11
  :SinglelineString,
11
12
  "super_diff/equality_matchers/singleline_string",
12
13
  )
13
-
14
- DEFAULTS = [
15
- Primitive,
16
- Array,
17
- Hash,
18
- MultilineString,
19
- SinglelineString,
20
- Default,
21
- ].freeze
22
14
  end
23
15
  end
16
+
17
+ require "super_diff/equality_matchers/defaults"
@@ -33,13 +33,7 @@ module SuperDiff
33
33
  protected
34
34
 
35
35
  def diff
36
- Differs::Array.call(
37
- expected,
38
- actual,
39
- indent_level: 0,
40
- extra_operational_sequencer_classes: extra_operational_sequencer_classes,
41
- extra_diff_formatter_classes: extra_diff_formatter_classes,
42
- )
36
+ Differs::Array.call(expected, actual, indent_level: 0)
43
37
  end
44
38
  end
45
39
  end
@@ -11,7 +11,7 @@ module SuperDiff
11
11
  [
12
12
  :expected!,
13
13
  :actual!,
14
- extra_operational_sequencer_classes: [],
14
+ extra_operation_tree_builder_classes: [],
15
15
  extra_diff_formatter_classes: [],
16
16
  ]
17
17
  )
@@ -47,13 +47,7 @@ module SuperDiff
47
47
  end
48
48
 
49
49
  def diff
50
- Differ.call(
51
- expected,
52
- actual,
53
- indent_level: 0,
54
- extra_operational_sequencer_classes: extra_operational_sequencer_classes,
55
- extra_diff_formatter_classes: extra_diff_formatter_classes,
56
- )
50
+ Differs::Main.call(expected, actual, indent_level: 0)
57
51
  end
58
52
  end
59
53
  end
@@ -0,0 +1,12 @@
1
+ module SuperDiff
2
+ module EqualityMatchers
3
+ DEFAULTS = [
4
+ Primitive,
5
+ Array,
6
+ Hash,
7
+ MultilineString,
8
+ SinglelineString,
9
+ Default,
10
+ ].freeze
11
+ end
12
+ end
@@ -33,13 +33,7 @@ module SuperDiff
33
33
  protected
34
34
 
35
35
  def diff
36
- Differs::Hash.call(
37
- expected,
38
- actual,
39
- indent_level: 0,
40
- extra_operational_sequencer_classes: extra_operational_sequencer_classes,
41
- extra_diff_formatter_classes: extra_diff_formatter_classes,
42
- )
36
+ Differs::Hash.call(expected, actual, indent_level: 0)
43
37
  end
44
38
  end
45
39
  end