super_diff 0.1.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.
- checksums.yaml +7 -0
- data/README.md +174 -0
- data/lib/super_diff/csi/color_helper.rb +52 -0
- data/lib/super_diff/csi/eight_bit_color.rb +131 -0
- data/lib/super_diff/csi/eight_bit_sequence.rb +27 -0
- data/lib/super_diff/csi/four_bit_color.rb +80 -0
- data/lib/super_diff/csi/four_bit_sequence.rb +24 -0
- data/lib/super_diff/csi/reset_sequence.rb +9 -0
- data/lib/super_diff/csi/sequence.rb +22 -0
- data/lib/super_diff/csi/twenty_four_bit_color.rb +41 -0
- data/lib/super_diff/csi/twenty_four_bit_sequence.rb +27 -0
- data/lib/super_diff/csi.rb +29 -0
- data/lib/super_diff/diff_formatter.rb +37 -0
- data/lib/super_diff/diff_formatters/array.rb +21 -0
- data/lib/super_diff/diff_formatters/base.rb +37 -0
- data/lib/super_diff/diff_formatters/collection.rb +107 -0
- data/lib/super_diff/diff_formatters/hash.rb +34 -0
- data/lib/super_diff/diff_formatters/multi_line_string.rb +31 -0
- data/lib/super_diff/diff_formatters/object.rb +27 -0
- data/lib/super_diff/diff_formatters.rb +5 -0
- data/lib/super_diff/differ.rb +48 -0
- data/lib/super_diff/differs/array.rb +24 -0
- data/lib/super_diff/differs/base.rb +42 -0
- data/lib/super_diff/differs/empty.rb +13 -0
- data/lib/super_diff/differs/hash.rb +24 -0
- data/lib/super_diff/differs/multi_line_string.rb +27 -0
- data/lib/super_diff/differs/object.rb +68 -0
- data/lib/super_diff/differs.rb +5 -0
- data/lib/super_diff/equality_matcher.rb +45 -0
- data/lib/super_diff/equality_matchers/array.rb +44 -0
- data/lib/super_diff/equality_matchers/base.rb +42 -0
- data/lib/super_diff/equality_matchers/hash.rb +44 -0
- data/lib/super_diff/equality_matchers/multi_line_string.rb +44 -0
- data/lib/super_diff/equality_matchers/object.rb +18 -0
- data/lib/super_diff/equality_matchers/single_line_string.rb +28 -0
- data/lib/super_diff/equality_matchers.rb +5 -0
- data/lib/super_diff/errors.rb +20 -0
- data/lib/super_diff/helpers.rb +96 -0
- data/lib/super_diff/operation_sequences/array.rb +14 -0
- data/lib/super_diff/operation_sequences/base.rb +11 -0
- data/lib/super_diff/operation_sequences/hash.rb +14 -0
- data/lib/super_diff/operation_sequences/object.rb +14 -0
- data/lib/super_diff/operational_sequencer.rb +43 -0
- data/lib/super_diff/operational_sequencers/array.rb +127 -0
- data/lib/super_diff/operational_sequencers/base.rb +97 -0
- data/lib/super_diff/operational_sequencers/hash.rb +82 -0
- data/lib/super_diff/operational_sequencers/multi_line_string.rb +85 -0
- data/lib/super_diff/operational_sequencers/object.rb +96 -0
- data/lib/super_diff/operational_sequencers.rb +5 -0
- data/lib/super_diff/operations/binary_operation.rb +47 -0
- data/lib/super_diff/operations/unary_operation.rb +25 -0
- data/lib/super_diff/rspec/differ.rb +30 -0
- data/lib/super_diff/rspec/monkey_patches.rb +122 -0
- data/lib/super_diff/rspec.rb +19 -0
- data/lib/super_diff/value_inspection.rb +11 -0
- data/lib/super_diff/version.rb +3 -0
- data/lib/super_diff.rb +50 -0
- data/spec/examples.txt +46 -0
- data/spec/integration/rspec_spec.rb +261 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/support/color_helper.rb +49 -0
- data/spec/support/command_runner.rb +279 -0
- data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +76 -0
- data/spec/support/person.rb +23 -0
- data/spec/support/person_diff_formatter.rb +15 -0
- data/spec/support/person_operation_sequence.rb +14 -0
- data/spec/support/person_operational_sequencer.rb +19 -0
- data/spec/unit/equality_matcher_spec.rb +1233 -0
- data/super_diff.gemspec +23 -0
- metadata +153 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
module SuperDiff
|
2
|
+
module OperationalSequencers
|
3
|
+
class MultiLineString < Base
|
4
|
+
def self.applies_to?(value)
|
5
|
+
value.is_a?(::String) && value.include?("\n")
|
6
|
+
end
|
7
|
+
|
8
|
+
def initialize(*args)
|
9
|
+
super(*args)
|
10
|
+
|
11
|
+
@original_expected = @expected
|
12
|
+
@original_actual = @actual
|
13
|
+
@expected = split_into_lines(@expected)
|
14
|
+
@actual = split_into_lines(@actual)
|
15
|
+
@sequence_matcher = PatienceDiff::SequenceMatcher.new
|
16
|
+
end
|
17
|
+
|
18
|
+
protected
|
19
|
+
|
20
|
+
def unary_operations
|
21
|
+
opcodes.flat_map do |code, a_start, a_end, b_start, b_end|
|
22
|
+
if code == :delete
|
23
|
+
add_delete_operations(a_start..a_end)
|
24
|
+
elsif code == :insert
|
25
|
+
add_insert_operations(b_start..b_end)
|
26
|
+
else
|
27
|
+
add_noop_operations(b_start..b_end)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def operation_sequence_class
|
33
|
+
OperationSequences::Array
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
attr_reader :sequence_matcher, :original_expected, :original_actual
|
39
|
+
|
40
|
+
def split_into_lines(str)
|
41
|
+
str.split(/(\n)/).map { |v| v.tr("\n", "⏎") }.each_slice(2).map(&:join)
|
42
|
+
end
|
43
|
+
|
44
|
+
def opcodes
|
45
|
+
sequence_matcher.diff_opcodes(expected, actual)
|
46
|
+
end
|
47
|
+
|
48
|
+
def add_delete_operations(indices)
|
49
|
+
indices.map do |index|
|
50
|
+
Operations::UnaryOperation.new(
|
51
|
+
name: :delete,
|
52
|
+
collection: expected,
|
53
|
+
key: index,
|
54
|
+
index: index,
|
55
|
+
value: expected[index],
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def add_insert_operations(indices)
|
61
|
+
indices.map do |index|
|
62
|
+
Operations::UnaryOperation.new(
|
63
|
+
name: :insert,
|
64
|
+
collection: actual,
|
65
|
+
key: index,
|
66
|
+
index: index,
|
67
|
+
value: actual[index],
|
68
|
+
)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def add_noop_operations(indices)
|
73
|
+
indices.map do |index|
|
74
|
+
Operations::UnaryOperation.new(
|
75
|
+
name: :noop,
|
76
|
+
collection: actual,
|
77
|
+
key: index,
|
78
|
+
index: index,
|
79
|
+
value: actual[index],
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
module SuperDiff
|
2
|
+
module OperationalSequencers
|
3
|
+
class Object < Base
|
4
|
+
def initialize(*args)
|
5
|
+
super(*args)
|
6
|
+
|
7
|
+
@expected_attributes = attribute_names.reduce({}) do |hash, name|
|
8
|
+
hash.merge(name => expected.public_send(name))
|
9
|
+
end
|
10
|
+
|
11
|
+
@actual_attributes = attribute_names.reduce({}) do |hash, name|
|
12
|
+
hash.merge(name => actual.public_send(name))
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
|
18
|
+
def unary_operations
|
19
|
+
attribute_names.reduce([]) do |operations, name|
|
20
|
+
possibly_add_noop_operation_to(operations, name)
|
21
|
+
possibly_add_delete_operation_to(operations, name)
|
22
|
+
possibly_add_insert_operation_to(operations, name)
|
23
|
+
operations
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def operation_sequence_class
|
28
|
+
OperationSequences::Object
|
29
|
+
end
|
30
|
+
|
31
|
+
def attribute_names
|
32
|
+
raise NotImplementedError
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
attr_reader :expected_attributes, :actual_attributes
|
38
|
+
|
39
|
+
def possibly_add_noop_operation_to(operations, attribute_name)
|
40
|
+
if should_add_noop_operation?(attribute_name)
|
41
|
+
operations << Operations::UnaryOperation.new(
|
42
|
+
name: :noop,
|
43
|
+
collection: actual_attributes,
|
44
|
+
key: attribute_name,
|
45
|
+
index: attribute_names.index(attribute_name),
|
46
|
+
value: actual_attributes[attribute_name],
|
47
|
+
)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def should_add_noop_operation?(attribute_name)
|
52
|
+
expected_attributes.include?(attribute_name) &&
|
53
|
+
actual_attributes.include?(attribute_name) &&
|
54
|
+
expected_attributes[attribute_name] == actual_attributes[attribute_name]
|
55
|
+
end
|
56
|
+
|
57
|
+
def possibly_add_delete_operation_to(operations, attribute_name)
|
58
|
+
if should_add_delete_operation?(attribute_name)
|
59
|
+
operations << Operations::UnaryOperation.new(
|
60
|
+
name: :delete,
|
61
|
+
collection: expected_attributes,
|
62
|
+
key: attribute_name,
|
63
|
+
index: attribute_names.index(attribute_name),
|
64
|
+
value: expected_attributes[attribute_name],
|
65
|
+
)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def should_add_delete_operation?(attribute_name)
|
70
|
+
expected_attributes.include?(attribute_name) && (
|
71
|
+
!actual_attributes.include?(attribute_name) ||
|
72
|
+
expected_attributes[attribute_name] != actual_attributes[attribute_name]
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
def possibly_add_insert_operation_to(operations, attribute_name)
|
77
|
+
if should_add_insert_operation?(attribute_name)
|
78
|
+
operations << Operations::UnaryOperation.new(
|
79
|
+
name: :insert,
|
80
|
+
collection: actual_attributes,
|
81
|
+
key: attribute_name,
|
82
|
+
index: attribute_names.index(attribute_name),
|
83
|
+
value: actual_attributes[attribute_name],
|
84
|
+
)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def should_add_insert_operation?(attribute_name)
|
89
|
+
!expected_attributes.include?(attribute_name) || (
|
90
|
+
actual_attributes.include?(attribute_name) &&
|
91
|
+
expected_attributes[attribute_name] != actual_attributes[attribute_name]
|
92
|
+
)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module SuperDiff
|
2
|
+
module Operations
|
3
|
+
class BinaryOperation
|
4
|
+
attr_reader(
|
5
|
+
:name,
|
6
|
+
:left_collection,
|
7
|
+
:right_collection,
|
8
|
+
:left_key,
|
9
|
+
:right_key,
|
10
|
+
:left_value,
|
11
|
+
:right_value,
|
12
|
+
:left_index,
|
13
|
+
:right_index,
|
14
|
+
:child_operations,
|
15
|
+
)
|
16
|
+
|
17
|
+
def initialize(
|
18
|
+
name:,
|
19
|
+
left_collection:,
|
20
|
+
right_collection:,
|
21
|
+
left_index:,
|
22
|
+
right_index:,
|
23
|
+
left_key:,
|
24
|
+
right_key:,
|
25
|
+
left_value:,
|
26
|
+
right_value:,
|
27
|
+
child_operations: []
|
28
|
+
)
|
29
|
+
@name = name
|
30
|
+
@left_collection = left_collection
|
31
|
+
@right_collection = right_collection
|
32
|
+
@left_index = left_index
|
33
|
+
@right_index = right_index
|
34
|
+
@left_key = left_key
|
35
|
+
@right_key = right_key
|
36
|
+
@left_value = left_value
|
37
|
+
@right_value = right_value
|
38
|
+
@child_operations = child_operations
|
39
|
+
end
|
40
|
+
|
41
|
+
def should_add_comma_after_displaying?
|
42
|
+
left_index < left_collection.size - 1 ||
|
43
|
+
right_index < right_collection.size - 1
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module SuperDiff
|
2
|
+
module Operations
|
3
|
+
class UnaryOperation
|
4
|
+
attr_reader(
|
5
|
+
:name,
|
6
|
+
:collection,
|
7
|
+
:key,
|
8
|
+
:value,
|
9
|
+
:index,
|
10
|
+
)
|
11
|
+
|
12
|
+
def initialize(name:, collection:, key:, value:, index:)
|
13
|
+
@name = name
|
14
|
+
@collection = collection
|
15
|
+
@key = key
|
16
|
+
@value = value
|
17
|
+
@index = index
|
18
|
+
end
|
19
|
+
|
20
|
+
def should_add_comma_after_displaying?
|
21
|
+
index < collection.size - 1
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module SuperDiff
|
2
|
+
module RSpec
|
3
|
+
module Differ
|
4
|
+
def self.diff(actual, expected)
|
5
|
+
if (
|
6
|
+
expected != actual &&
|
7
|
+
expected.class == actual.class &&
|
8
|
+
!expected.is_a?(Symbol) &&
|
9
|
+
!expected.is_a?(Integer) &&
|
10
|
+
!(
|
11
|
+
expected.is_a?(String) &&
|
12
|
+
actual.is_a?(String) &&
|
13
|
+
!expected.include?("\n") &&
|
14
|
+
!actual.include?("\n")
|
15
|
+
)
|
16
|
+
)
|
17
|
+
diff = SuperDiff::Differ.call(
|
18
|
+
expected,
|
19
|
+
actual,
|
20
|
+
extra_operational_sequencer_classes: RSpec.extra_operational_sequencer_classes,
|
21
|
+
extra_diff_formatter_classes: RSpec.extra_diff_formatter_classes,
|
22
|
+
)
|
23
|
+
"\n\n" + diff
|
24
|
+
else
|
25
|
+
""
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
RSpec::Expectations.instance_eval do
|
2
|
+
def differ
|
3
|
+
SuperDiff::RSpec::Differ
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
# rubocop:disable all
|
8
|
+
RSpec::Core::Formatters::ConsoleCodes.instance_eval do
|
9
|
+
# UPDATE: Patch so it returns nothing if code_or_symbol is nil
|
10
|
+
def console_code_for(code_or_symbol)
|
11
|
+
if code_or_symbol
|
12
|
+
if (config_method = config_colors_to_methods[code_or_symbol])
|
13
|
+
console_code_for RSpec.configuration.__send__(config_method)
|
14
|
+
elsif RSpec::Core::Formatters::ConsoleCodes::VT100_CODE_VALUES.key?(code_or_symbol)
|
15
|
+
code_or_symbol
|
16
|
+
else
|
17
|
+
RSpec::Core::Formatters::ConsoleCodes::VT100_CODES.fetch(code_or_symbol) do
|
18
|
+
console_code_for(:white)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# UPDATE: Patch so it does not apply a color if code_or_symbol is nil
|
25
|
+
def wrap(text, code_or_symbol)
|
26
|
+
if RSpec.configuration.color_enabled? && code = console_code_for(code_or_symbol)
|
27
|
+
"\e[#{code}m#{text}\e[0m"
|
28
|
+
else
|
29
|
+
text
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec::Core::Formatters::ExceptionPresenter.class_eval do
|
35
|
+
# UPDATE: Copy from SyntaxHighlighter::CodeRayImplementation
|
36
|
+
RESET_CODE = "\e[0m"
|
37
|
+
|
38
|
+
def initialize(exception, example, options={})
|
39
|
+
@exception = exception
|
40
|
+
@example = example
|
41
|
+
# UPDATE: Use no color by default
|
42
|
+
@message_color = options[:message_color]
|
43
|
+
@description = options.fetch(:description) { example.full_description }
|
44
|
+
@detail_formatter = options.fetch(:detail_formatter) { Proc.new {} }
|
45
|
+
@extra_detail_formatter = options.fetch(:extra_detail_formatter) { Proc.new {} }
|
46
|
+
@backtrace_formatter = options.fetch(:backtrace_formatter) { RSpec.configuration.backtrace_formatter }
|
47
|
+
@indentation = options.fetch(:indentation, 2)
|
48
|
+
@skip_shared_group_trace = options.fetch(:skip_shared_group_trace, false)
|
49
|
+
@failure_lines = options[:failure_lines]
|
50
|
+
end
|
51
|
+
|
52
|
+
def add_shared_group_lines(lines, colorizer)
|
53
|
+
return lines if @skip_shared_group_trace
|
54
|
+
|
55
|
+
example.metadata[:shared_group_inclusion_backtrace].each do |frame|
|
56
|
+
# Update: Use red instead of the default color
|
57
|
+
lines << colorizer.wrap(frame.description, :failure)
|
58
|
+
end
|
59
|
+
|
60
|
+
lines
|
61
|
+
end
|
62
|
+
|
63
|
+
# UPDATE: Style the first part in blue and the snippet of the line that failed
|
64
|
+
# in white
|
65
|
+
def failure_slash_error_lines
|
66
|
+
lines = read_failed_lines
|
67
|
+
|
68
|
+
failure_slash_error = RSpec::Core::Formatters::ConsoleCodes.wrap(
|
69
|
+
"Failure/Error: ",
|
70
|
+
:detail
|
71
|
+
)
|
72
|
+
|
73
|
+
if lines.count == 1
|
74
|
+
lines[0] =
|
75
|
+
failure_slash_error +
|
76
|
+
RSpec::Core::Formatters::ConsoleCodes.wrap(lines[0].strip, :white)
|
77
|
+
else
|
78
|
+
least_indentation =
|
79
|
+
RSpec::Core::Formatters::SnippetExtractor.least_indentation_from(lines)
|
80
|
+
lines = lines.map do |line|
|
81
|
+
RSpec::Core::Formatters::ConsoleCodes.wrap(
|
82
|
+
line.sub(/^#{least_indentation}/, ' '),
|
83
|
+
:white
|
84
|
+
)
|
85
|
+
end
|
86
|
+
lines.unshift(failure_slash_error)
|
87
|
+
end
|
88
|
+
|
89
|
+
lines
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
RSpec::Matchers::BuiltIn::Eq.class_eval do
|
94
|
+
def failure_message
|
95
|
+
"\n" +
|
96
|
+
colorizer.wrap("expected: #{expected_formatted}\n", :failure) +
|
97
|
+
colorizer.wrap(" got: #{actual_formatted}\n\n", :success) +
|
98
|
+
colorizer.wrap("(compared using ==)\n", :detail)
|
99
|
+
end
|
100
|
+
|
101
|
+
def failure_message_when_negated
|
102
|
+
"\n" +
|
103
|
+
colorizer.wrap("expected: value != #{expected_formatted}\n", :failure) +
|
104
|
+
colorizer.wrap(" got: #{actual_formatted}\n\n", :success) +
|
105
|
+
colorizer.wrap("(compared using ==)\n", :detail)
|
106
|
+
end
|
107
|
+
|
108
|
+
private
|
109
|
+
|
110
|
+
def colorizer
|
111
|
+
RSpec::Core::Formatters::ConsoleCodes
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
RSpec::Core::Formatters::SyntaxHighlighter.class_eval do
|
116
|
+
private
|
117
|
+
|
118
|
+
def implementation
|
119
|
+
RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation
|
120
|
+
end
|
121
|
+
end
|
122
|
+
# rubocop:enable all
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative "../super_diff"
|
2
|
+
require_relative "rspec/differ"
|
3
|
+
require_relative "rspec/monkey_patches"
|
4
|
+
|
5
|
+
module SuperDiff
|
6
|
+
module RSpec
|
7
|
+
class << self
|
8
|
+
attr_accessor :extra_operational_sequencer_classes
|
9
|
+
attr_accessor :extra_diff_formatter_classes
|
10
|
+
|
11
|
+
def configure
|
12
|
+
yield self
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
self.extra_operational_sequencer_classes = []
|
17
|
+
self.extra_diff_formatter_classes = []
|
18
|
+
end
|
19
|
+
end
|
data/lib/super_diff.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require "patience_diff"
|
2
|
+
require "diff-lcs"
|
3
|
+
|
4
|
+
require_relative "super_diff/csi"
|
5
|
+
require_relative "super_diff/errors"
|
6
|
+
require_relative "super_diff/helpers"
|
7
|
+
require_relative "super_diff/value_inspection"
|
8
|
+
|
9
|
+
require_relative "super_diff/equality_matchers/base"
|
10
|
+
require_relative "super_diff/equality_matchers/array"
|
11
|
+
require_relative "super_diff/equality_matchers/hash"
|
12
|
+
require_relative "super_diff/equality_matchers/multi_line_string"
|
13
|
+
require_relative "super_diff/equality_matchers/single_line_string"
|
14
|
+
require_relative "super_diff/equality_matchers/object"
|
15
|
+
require_relative "super_diff/equality_matchers"
|
16
|
+
require_relative "super_diff/equality_matcher"
|
17
|
+
|
18
|
+
require_relative "super_diff/operations/unary_operation"
|
19
|
+
require_relative "super_diff/operations/binary_operation"
|
20
|
+
|
21
|
+
require_relative "super_diff/operation_sequences/base"
|
22
|
+
require_relative "super_diff/operation_sequences/array"
|
23
|
+
require_relative "super_diff/operation_sequences/hash"
|
24
|
+
require_relative "super_diff/operation_sequences/object"
|
25
|
+
|
26
|
+
require_relative "super_diff/operational_sequencers/base"
|
27
|
+
require_relative "super_diff/operational_sequencers/array"
|
28
|
+
require_relative "super_diff/operational_sequencers/hash"
|
29
|
+
require_relative "super_diff/operational_sequencers/multi_line_string"
|
30
|
+
require_relative "super_diff/operational_sequencers/object"
|
31
|
+
require_relative "super_diff/operational_sequencers"
|
32
|
+
require_relative "super_diff/operational_sequencer"
|
33
|
+
|
34
|
+
require_relative "super_diff/diff_formatters/collection"
|
35
|
+
require_relative "super_diff/diff_formatters/base"
|
36
|
+
require_relative "super_diff/diff_formatters/array"
|
37
|
+
require_relative "super_diff/diff_formatters/hash"
|
38
|
+
require_relative "super_diff/diff_formatters/multi_line_string"
|
39
|
+
require_relative "super_diff/diff_formatters/object"
|
40
|
+
require_relative "super_diff/diff_formatters"
|
41
|
+
require_relative "super_diff/diff_formatter"
|
42
|
+
|
43
|
+
require_relative "super_diff/differs/base"
|
44
|
+
require_relative "super_diff/differs/array"
|
45
|
+
require_relative "super_diff/differs/empty"
|
46
|
+
require_relative "super_diff/differs/hash"
|
47
|
+
require_relative "super_diff/differs/multi_line_string"
|
48
|
+
require_relative "super_diff/differs/object"
|
49
|
+
require_relative "super_diff/differs"
|
50
|
+
require_relative "super_diff/differ"
|
data/spec/examples.txt
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
example_id | status | run_time |
|
2
|
+
---------------------------------------------- | ------ | --------------- |
|
3
|
+
./spec/integration/rspec_spec.rb[1:1:1] | passed | 0.27057 seconds |
|
4
|
+
./spec/integration/rspec_spec.rb[1:2:1] | passed | 0.28658 seconds |
|
5
|
+
./spec/integration/rspec_spec.rb[1:3:1] | passed | 0.26733 seconds |
|
6
|
+
./spec/integration/rspec_spec.rb[1:4:1] | passed | 0.26849 seconds |
|
7
|
+
./spec/integration/rspec_spec.rb[1:5:1] | passed | 0.38883 seconds |
|
8
|
+
./spec/integration/rspec_spec.rb[1:6:1] | passed | 0.26895 seconds |
|
9
|
+
./spec/integration/rspec_spec.rb[1:7:1] | passed | 0.27548 seconds |
|
10
|
+
./spec/unit/equality_matcher_spec.rb[1:1:1:1] | passed | 0.0002 seconds |
|
11
|
+
./spec/unit/equality_matcher_spec.rb[1:1:2:1] | passed | 0.00016 seconds |
|
12
|
+
./spec/unit/equality_matcher_spec.rb[1:1:3:1] | passed | 0.00034 seconds |
|
13
|
+
./spec/unit/equality_matcher_spec.rb[1:1:4:1] | passed | 0.00015 seconds |
|
14
|
+
./spec/unit/equality_matcher_spec.rb[1:1:5:1] | passed | 0.0001 seconds |
|
15
|
+
./spec/unit/equality_matcher_spec.rb[1:1:6:1] | passed | 0.00007 seconds |
|
16
|
+
./spec/unit/equality_matcher_spec.rb[1:1:7:1] | passed | 0.0002 seconds |
|
17
|
+
./spec/unit/equality_matcher_spec.rb[1:1:8:1] | passed | 0.00014 seconds |
|
18
|
+
./spec/unit/equality_matcher_spec.rb[1:1:9:1] | passed | 0.00119 seconds |
|
19
|
+
./spec/unit/equality_matcher_spec.rb[1:1:10:1] | passed | 0.00065 seconds |
|
20
|
+
./spec/unit/equality_matcher_spec.rb[1:1:11:1] | passed | 0.00023 seconds |
|
21
|
+
./spec/unit/equality_matcher_spec.rb[1:1:12:1] | passed | 0.00032 seconds |
|
22
|
+
./spec/unit/equality_matcher_spec.rb[1:1:13:1] | passed | 0.00037 seconds |
|
23
|
+
./spec/unit/equality_matcher_spec.rb[1:1:14:1] | passed | 0.00034 seconds |
|
24
|
+
./spec/unit/equality_matcher_spec.rb[1:1:15:1] | passed | 0.0005 seconds |
|
25
|
+
./spec/unit/equality_matcher_spec.rb[1:1:16:1] | passed | 0.00031 seconds |
|
26
|
+
./spec/unit/equality_matcher_spec.rb[1:1:17:1] | passed | 0.0004 seconds |
|
27
|
+
./spec/unit/equality_matcher_spec.rb[1:1:18:1] | passed | 0.00031 seconds |
|
28
|
+
./spec/unit/equality_matcher_spec.rb[1:1:19:1] | passed | 0.00049 seconds |
|
29
|
+
./spec/unit/equality_matcher_spec.rb[1:1:20:1] | passed | 0.00061 seconds |
|
30
|
+
./spec/unit/equality_matcher_spec.rb[1:1:21:1] | passed | 0.00064 seconds |
|
31
|
+
./spec/unit/equality_matcher_spec.rb[1:1:22:1] | passed | 0.0005 seconds |
|
32
|
+
./spec/unit/equality_matcher_spec.rb[1:1:23:1] | passed | 0.00232 seconds |
|
33
|
+
./spec/unit/equality_matcher_spec.rb[1:1:24:1] | passed | 0.00007 seconds |
|
34
|
+
./spec/unit/equality_matcher_spec.rb[1:1:25:1] | passed | 0.0005 seconds |
|
35
|
+
./spec/unit/equality_matcher_spec.rb[1:1:26:1] | passed | 0.00057 seconds |
|
36
|
+
./spec/unit/equality_matcher_spec.rb[1:1:27:1] | passed | 0.00058 seconds |
|
37
|
+
./spec/unit/equality_matcher_spec.rb[1:1:28:1] | passed | 0.00064 seconds |
|
38
|
+
./spec/unit/equality_matcher_spec.rb[1:1:29:1] | passed | 0.00053 seconds |
|
39
|
+
./spec/unit/equality_matcher_spec.rb[1:1:30:1] | passed | 0.0004 seconds |
|
40
|
+
./spec/unit/equality_matcher_spec.rb[1:1:31:1] | passed | 0.0005 seconds |
|
41
|
+
./spec/unit/equality_matcher_spec.rb[1:1:32:1] | passed | 0.00072 seconds |
|
42
|
+
./spec/unit/equality_matcher_spec.rb[1:1:33:1] | passed | 0.00115 seconds |
|
43
|
+
./spec/unit/equality_matcher_spec.rb[1:1:34:1] | passed | 0.00184 seconds |
|
44
|
+
./spec/unit/equality_matcher_spec.rb[1:1:35:1] | passed | 0.00196 seconds |
|
45
|
+
./spec/unit/equality_matcher_spec.rb[1:1:36:1] | passed | 0.00015 seconds |
|
46
|
+
./spec/unit/equality_matcher_spec.rb[1:1:37:1] | passed | 0.00014 seconds |
|