super_diff 0.4.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +64 -24
- data/lib/super_diff.rb +20 -17
- data/lib/super_diff/active_record.rb +20 -24
- data/lib/super_diff/active_record/diff_formatters/active_record_relation.rb +3 -3
- data/lib/super_diff/active_record/differs/active_record_relation.rb +3 -5
- data/lib/super_diff/active_record/object_inspection/inspectors/active_record_model.rb +32 -22
- data/lib/super_diff/active_record/object_inspection/inspectors/active_record_relation.rb +17 -7
- data/lib/super_diff/active_record/operation_tree_builders.rb +14 -0
- data/lib/super_diff/active_record/{operational_sequencers → operation_tree_builders}/active_record_model.rb +2 -2
- data/lib/super_diff/active_record/{operational_sequencers → operation_tree_builders}/active_record_relation.rb +4 -4
- data/lib/super_diff/active_record/{operation_sequences.rb → operation_trees.rb} +2 -2
- data/lib/super_diff/active_record/{operation_sequences → operation_trees}/active_record_relation.rb +2 -2
- data/lib/super_diff/active_support.rb +16 -19
- data/lib/super_diff/active_support/diff_formatters/hash_with_indifferent_access.rb +3 -3
- data/lib/super_diff/active_support/differs/hash_with_indifferent_access.rb +3 -5
- data/lib/super_diff/active_support/object_inspection/inspectors/hash_with_indifferent_access.rb +17 -7
- data/lib/super_diff/active_support/operation_tree_builders.rb +10 -0
- data/lib/super_diff/active_support/{operational_sequencers → operation_tree_builders}/hash_with_indifferent_access.rb +2 -2
- data/lib/super_diff/active_support/{operation_sequences.rb → operation_trees.rb} +2 -2
- data/lib/super_diff/active_support/{operation_sequences → operation_trees}/hash_with_indifferent_access.rb +2 -2
- data/lib/super_diff/colorized_document_extensions.rb +4 -4
- data/lib/super_diff/configuration.rb +70 -0
- data/lib/super_diff/csi.rb +2 -1
- data/lib/super_diff/diff_formatters.rb +3 -3
- data/lib/super_diff/diff_formatters/array.rb +3 -3
- data/lib/super_diff/diff_formatters/base.rb +3 -2
- data/lib/super_diff/diff_formatters/collection.rb +3 -3
- data/lib/super_diff/diff_formatters/custom_object.rb +3 -3
- data/lib/super_diff/diff_formatters/default_object.rb +6 -8
- data/lib/super_diff/diff_formatters/defaults.rb +10 -0
- data/lib/super_diff/diff_formatters/hash.rb +3 -3
- data/lib/super_diff/diff_formatters/main.rb +41 -0
- data/lib/super_diff/diff_formatters/multiline_string.rb +7 -7
- data/lib/super_diff/differs.rb +4 -11
- data/lib/super_diff/differs/array.rb +2 -11
- data/lib/super_diff/differs/base.rb +20 -3
- data/lib/super_diff/differs/custom_object.rb +2 -11
- data/lib/super_diff/differs/default_object.rb +2 -8
- data/lib/super_diff/differs/defaults.rb +12 -0
- data/lib/super_diff/differs/hash.rb +2 -11
- data/lib/super_diff/differs/main.rb +48 -0
- data/lib/super_diff/differs/multiline_string.rb +2 -14
- data/lib/super_diff/differs/time_like.rb +15 -0
- data/lib/super_diff/equality_matchers.rb +3 -9
- data/lib/super_diff/equality_matchers/array.rb +3 -9
- data/lib/super_diff/equality_matchers/base.rb +1 -1
- data/lib/super_diff/equality_matchers/default.rb +3 -9
- data/lib/super_diff/equality_matchers/defaults.rb +12 -0
- data/lib/super_diff/equality_matchers/hash.rb +3 -9
- data/lib/super_diff/equality_matchers/main.rb +21 -0
- data/lib/super_diff/equality_matchers/multiline_string.rb +3 -9
- data/lib/super_diff/equality_matchers/primitive.rb +2 -2
- data/lib/super_diff/equality_matchers/singleline_string.rb +2 -2
- data/lib/super_diff/errors.rb +16 -0
- data/lib/super_diff/errors/no_diff_formatter_available_error.rb +21 -0
- data/lib/super_diff/errors/no_differ_available_error.rb +24 -0
- data/lib/super_diff/errors/no_operational_sequencer_available_error.rb +22 -0
- data/lib/super_diff/gem_version.rb +45 -0
- data/lib/super_diff/implementation_checks.rb +19 -0
- data/lib/super_diff/object_inspection.rb +1 -10
- data/lib/super_diff/object_inspection/inspection_tree.rb +6 -2
- data/lib/super_diff/object_inspection/inspectors.rb +5 -1
- data/lib/super_diff/object_inspection/inspectors/array.rb +20 -10
- data/lib/super_diff/object_inspection/inspectors/base.rb +36 -0
- data/lib/super_diff/object_inspection/inspectors/custom_object.rb +24 -14
- data/lib/super_diff/object_inspection/inspectors/default_object.rb +44 -30
- data/lib/super_diff/object_inspection/inspectors/defaults.rb +15 -0
- data/lib/super_diff/object_inspection/inspectors/hash.rb +20 -10
- data/lib/super_diff/object_inspection/inspectors/main.rb +35 -0
- data/lib/super_diff/object_inspection/inspectors/primitive.rb +20 -5
- data/lib/super_diff/object_inspection/inspectors/string.rb +15 -5
- data/lib/super_diff/object_inspection/inspectors/time_like.rb +23 -0
- data/lib/super_diff/object_inspection/nodes/inspection.rb +9 -2
- data/lib/super_diff/operation_tree_builders.rb +18 -0
- data/lib/super_diff/{operational_sequencers → operation_tree_builders}/array.rb +38 -59
- data/lib/super_diff/operation_tree_builders/base.rb +98 -0
- data/lib/super_diff/{operational_sequencers → operation_tree_builders}/custom_object.rb +3 -3
- data/lib/super_diff/{operational_sequencers → operation_tree_builders}/default_object.rb +8 -3
- data/lib/super_diff/operation_tree_builders/defaults.rb +5 -0
- data/lib/super_diff/operation_tree_builders/hash.rb +226 -0
- data/lib/super_diff/operation_tree_builders/main.rb +42 -0
- data/lib/super_diff/{operational_sequencers → operation_tree_builders}/multiline_string.rb +3 -3
- data/lib/super_diff/operation_tree_builders/time_like.rb +34 -0
- data/lib/super_diff/operation_trees.rb +13 -0
- data/lib/super_diff/{operation_sequences → operation_trees}/array.rb +5 -1
- data/lib/super_diff/{operation_sequences → operation_trees}/base.rb +9 -1
- data/lib/super_diff/{operation_sequences → operation_trees}/custom_object.rb +5 -1
- data/lib/super_diff/{operation_sequences → operation_trees}/default_object.rb +10 -8
- data/lib/super_diff/operation_trees/defaults.rb +5 -0
- data/lib/super_diff/{operation_sequences → operation_trees}/hash.rb +5 -1
- data/lib/super_diff/operation_trees/main.rb +35 -0
- data/lib/super_diff/operation_trees/multiline_string.rb +18 -0
- data/lib/super_diff/operations/unary_operation.rb +3 -0
- data/lib/super_diff/recursion_guard.rb +2 -0
- data/lib/super_diff/rspec.rb +49 -13
- data/lib/super_diff/rspec/augmented_matcher.rb +1 -1
- data/lib/super_diff/rspec/differ.rb +2 -17
- data/lib/super_diff/rspec/differs/collection_containing_exactly.rb +2 -7
- data/lib/super_diff/rspec/differs/collection_including.rb +2 -7
- data/lib/super_diff/rspec/differs/hash_including.rb +2 -7
- data/lib/super_diff/rspec/differs/object_having_attributes.rb +2 -7
- data/lib/super_diff/rspec/matcher_text_builders/base.rb +7 -7
- data/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb +6 -6
- data/lib/super_diff/rspec/matcher_text_builders/contain_exactly.rb +1 -1
- data/lib/super_diff/rspec/matcher_text_builders/have_predicate.rb +4 -4
- data/lib/super_diff/rspec/matcher_text_builders/match.rb +1 -1
- data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +1 -1
- data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +6 -6
- data/lib/super_diff/rspec/matcher_text_template.rb +1 -1
- data/lib/super_diff/rspec/monkey_patches.rb +23 -14
- data/lib/super_diff/rspec/object_inspection.rb +0 -1
- data/lib/super_diff/rspec/object_inspection/inspectors.rb +16 -0
- data/lib/super_diff/rspec/object_inspection/inspectors/collection_containing_exactly.rb +17 -8
- data/lib/super_diff/rspec/object_inspection/inspectors/collection_including.rb +15 -9
- data/lib/super_diff/rspec/object_inspection/inspectors/hash_including.rb +20 -10
- data/lib/super_diff/rspec/object_inspection/inspectors/instance_of.rb +23 -0
- data/lib/super_diff/rspec/object_inspection/inspectors/kind_of.rb +23 -0
- data/lib/super_diff/rspec/object_inspection/inspectors/object_having_attributes.rb +20 -11
- data/lib/super_diff/rspec/object_inspection/inspectors/primitive.rb +13 -0
- data/lib/super_diff/rspec/object_inspection/inspectors/value_within.rb +29 -0
- data/lib/super_diff/rspec/operation_tree_builders.rb +22 -0
- data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/collection_containing_exactly.rb +17 -6
- data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/collection_including.rb +2 -2
- data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/hash_including.rb +3 -11
- data/lib/super_diff/rspec/{operational_sequencers → operation_tree_builders}/object_having_attributes.rb +4 -8
- data/lib/super_diff/version.rb +1 -1
- data/spec/examples.txt +393 -393
- data/spec/integration/rspec/be_falsey_matcher_spec.rb +10 -10
- data/spec/integration/rspec/be_matcher_spec.rb +100 -100
- data/spec/integration/rspec/be_nil_matcher_spec.rb +10 -10
- data/spec/integration/rspec/be_predicate_matcher_spec.rb +103 -103
- data/spec/integration/rspec/be_truthy_matcher_spec.rb +10 -10
- data/spec/integration/rspec/contain_exactly_matcher_spec.rb +107 -107
- data/spec/integration/rspec/eq_matcher_spec.rb +230 -230
- data/spec/integration/rspec/have_attributes_matcher_spec.rb +360 -233
- data/spec/integration/rspec/have_predicate_matcher_spec.rb +65 -65
- data/spec/integration/rspec/include_matcher_spec.rb +73 -73
- data/spec/integration/rspec/match_array_matcher_spec.rb +149 -107
- data/spec/integration/rspec/match_matcher_spec.rb +274 -274
- data/spec/integration/rspec/raise_error_matcher_spec.rb +86 -86
- data/spec/integration/rspec/respond_to_matcher_spec.rb +240 -240
- data/spec/integration/rspec/third_party_matcher_spec.rb +8 -8
- data/spec/integration/rspec/unhandled_errors_spec.rb +69 -13
- data/spec/spec_helper.rb +22 -13
- data/spec/support/command_runner.rb +3 -0
- data/spec/support/integration/helpers.rb +15 -95
- data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +15 -30
- data/spec/support/integration/test_programs/base.rb +122 -0
- data/spec/support/integration/test_programs/plain.rb +13 -0
- data/spec/support/integration/test_programs/rspec_active_record.rb +17 -0
- data/spec/support/integration/test_programs/rspec_active_support.rb +17 -0
- data/spec/support/integration/test_programs/rspec_rails.rb +17 -0
- data/spec/support/models/active_record/person.rb +4 -11
- data/spec/support/models/active_record/shipping_address.rb +10 -14
- data/spec/support/object_id.rb +6 -5
- data/spec/support/shared_examples/active_record.rb +108 -108
- data/spec/support/shared_examples/hash_with_indifferent_access.rb +196 -232
- data/spec/tmp/integration_spec.rb +15 -0
- data/spec/unit/{equality_matcher_spec.rb → equality_matchers/main_spec.rb} +518 -362
- data/spec/unit/object_inspection_spec.rb +77 -1
- data/super_diff.gemspec +3 -2
- metadata +83 -54
- data/lib/super_diff/active_record/object_inspection/map_extension.rb +0 -18
- data/lib/super_diff/active_record/operational_sequencers.rb +0 -14
- data/lib/super_diff/active_support/object_inspection/map_extension.rb +0 -15
- data/lib/super_diff/active_support/operational_sequencers.rb +0 -10
- data/lib/super_diff/diff_formatter.rb +0 -32
- data/lib/super_diff/differ.rb +0 -51
- data/lib/super_diff/differs/time.rb +0 -24
- data/lib/super_diff/equality_matcher.rb +0 -32
- data/lib/super_diff/no_differ_available_error.rb +0 -22
- data/lib/super_diff/no_operational_sequencer_available_error.rb +0 -20
- data/lib/super_diff/object_inspection/inspector.rb +0 -27
- data/lib/super_diff/object_inspection/inspectors/time.rb +0 -13
- data/lib/super_diff/object_inspection/map.rb +0 -30
- data/lib/super_diff/operation_sequences.rb +0 -9
- data/lib/super_diff/operational_sequencer.rb +0 -48
- data/lib/super_diff/operational_sequencers.rb +0 -17
- data/lib/super_diff/operational_sequencers/base.rb +0 -89
- data/lib/super_diff/operational_sequencers/hash.rb +0 -85
- data/lib/super_diff/operational_sequencers/time_like.rb +0 -30
- data/lib/super_diff/rspec/configuration.rb +0 -31
- data/lib/super_diff/rspec/object_inspection/map_extension.rb +0 -23
- data/lib/super_diff/rspec/operational_sequencers.rb +0 -22
@@ -1,6 +1,6 @@
|
|
1
1
|
shared_examples_for "integration with HashWithIndifferentAccess" do
|
2
2
|
describe "and RSpec's #eq matcher" do
|
3
|
-
context "when the actual
|
3
|
+
context "when the actual value is a HashWithIndifferentAccess" do
|
4
4
|
context "and both hashes are one-dimensional" do
|
5
5
|
context "and the expected hash contains symbol keys" do
|
6
6
|
it "produces the correct output" do
|
@@ -12,7 +12,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
12
12
|
state: "CA",
|
13
13
|
zip: "90382",
|
14
14
|
}
|
15
|
-
actual
|
15
|
+
actual = HashWithIndifferentAccess.new({
|
16
16
|
line_1: "456 Ponderosa Ct.",
|
17
17
|
city: "Oakland",
|
18
18
|
state: "CA",
|
@@ -20,35 +20,32 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
20
20
|
})
|
21
21
|
expect(actual).to eq(expected)
|
22
22
|
TEST
|
23
|
-
program =
|
24
|
-
snippet,
|
25
|
-
color_enabled: color_enabled,
|
26
|
-
)
|
23
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
27
24
|
|
28
25
|
expected_output = build_expected_output(
|
29
26
|
color_enabled: color_enabled,
|
30
27
|
snippet: "expect(actual).to eq(expected)",
|
31
28
|
expectation: proc {
|
32
29
|
line do
|
33
|
-
plain
|
34
|
-
|
30
|
+
plain %|Expected |
|
31
|
+
actual %|#<HashWithIndifferentAccess { "line_1" => "456 Ponderosa Ct.", "city" => "Oakland", "state" => "CA", "zip" => "91234" }>|
|
35
32
|
end
|
36
33
|
|
37
34
|
line do
|
38
|
-
plain
|
39
|
-
|
35
|
+
plain %| to eq |
|
36
|
+
expected %|{ line_1: "123 Main St.", city: "Hill Valley", state: "CA", zip: "90382" }|
|
40
37
|
end
|
41
38
|
},
|
42
39
|
diff: proc {
|
43
|
-
plain_line
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
plain_line
|
49
|
-
|
50
|
-
|
51
|
-
plain_line
|
40
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
41
|
+
expected_line %|- "line_1" => "123 Main St.",|
|
42
|
+
actual_line %|+ "line_1" => "456 Ponderosa Ct.",|
|
43
|
+
expected_line %|- "city" => "Hill Valley",|
|
44
|
+
actual_line %|+ "city" => "Oakland",|
|
45
|
+
plain_line %| "state" => "CA",|
|
46
|
+
expected_line %|- "zip" => "90382"|
|
47
|
+
actual_line %|+ "zip" => "91234"|
|
48
|
+
plain_line %| }>|
|
52
49
|
},
|
53
50
|
)
|
54
51
|
|
@@ -69,7 +66,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
69
66
|
"state" => "CA",
|
70
67
|
"zip" => "90382",
|
71
68
|
}
|
72
|
-
actual
|
69
|
+
actual = HashWithIndifferentAccess.new({
|
73
70
|
line_1: "456 Ponderosa Ct.",
|
74
71
|
city: "Oakland",
|
75
72
|
state: "CA",
|
@@ -77,35 +74,32 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
77
74
|
})
|
78
75
|
expect(actual).to eq(expected)
|
79
76
|
TEST
|
80
|
-
program =
|
81
|
-
snippet,
|
82
|
-
color_enabled: color_enabled,
|
83
|
-
)
|
77
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
84
78
|
|
85
79
|
expected_output = build_expected_output(
|
86
80
|
color_enabled: color_enabled,
|
87
81
|
snippet: "expect(actual).to eq(expected)",
|
88
82
|
expectation: proc {
|
89
83
|
line do
|
90
|
-
plain
|
91
|
-
|
84
|
+
plain %|Expected |
|
85
|
+
actual %|#<HashWithIndifferentAccess { "line_1" => "456 Ponderosa Ct.", "city" => "Oakland", "state" => "CA", "zip" => "91234" }>|
|
92
86
|
end
|
93
87
|
|
94
88
|
line do
|
95
|
-
plain
|
96
|
-
|
89
|
+
plain %| to eq |
|
90
|
+
expected %|{ "line_1" => "123 Main St.", "city" => "Hill Valley", "state" => "CA", "zip" => "90382" }|
|
97
91
|
end
|
98
92
|
},
|
99
93
|
diff: proc {
|
100
|
-
plain_line
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
plain_line
|
106
|
-
|
107
|
-
|
108
|
-
plain_line
|
94
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
95
|
+
expected_line %|- "line_1" => "123 Main St.",|
|
96
|
+
actual_line %|+ "line_1" => "456 Ponderosa Ct.",|
|
97
|
+
expected_line %|- "city" => "Hill Valley",|
|
98
|
+
actual_line %|+ "city" => "Oakland",|
|
99
|
+
plain_line %| "state" => "CA",|
|
100
|
+
expected_line %|- "zip" => "90382"|
|
101
|
+
actual_line %|+ "zip" => "91234"|
|
102
|
+
plain_line %| }>|
|
109
103
|
},
|
110
104
|
)
|
111
105
|
|
@@ -130,7 +124,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
130
124
|
state: "CA",
|
131
125
|
zip: "91234",
|
132
126
|
})
|
133
|
-
actual
|
127
|
+
actual = {
|
134
128
|
line_1: "123 Main St.",
|
135
129
|
city: "Hill Valley",
|
136
130
|
state: "CA",
|
@@ -138,35 +132,32 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
138
132
|
}
|
139
133
|
expect(actual).to eq(expected)
|
140
134
|
TEST
|
141
|
-
program =
|
142
|
-
snippet,
|
143
|
-
color_enabled: color_enabled,
|
144
|
-
)
|
135
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
145
136
|
|
146
137
|
expected_output = build_expected_output(
|
147
138
|
color_enabled: color_enabled,
|
148
139
|
snippet: "expect(actual).to eq(expected)",
|
149
140
|
expectation: proc {
|
150
141
|
line do
|
151
|
-
plain
|
152
|
-
|
142
|
+
plain %|Expected |
|
143
|
+
actual %|{ line_1: "123 Main St.", city: "Hill Valley", state: "CA", zip: "90382" }|
|
153
144
|
end
|
154
145
|
|
155
146
|
line do
|
156
|
-
plain
|
157
|
-
|
147
|
+
plain %| to eq |
|
148
|
+
expected %|#<HashWithIndifferentAccess { "line_1" => "456 Ponderosa Ct.", "city" => "Oakland", "state" => "CA", "zip" => "91234" }>|
|
158
149
|
end
|
159
150
|
},
|
160
151
|
diff: proc {
|
161
|
-
plain_line
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
plain_line
|
167
|
-
|
168
|
-
|
169
|
-
plain_line
|
152
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
153
|
+
expected_line %|- "line_1" => "456 Ponderosa Ct.",|
|
154
|
+
actual_line %|+ "line_1" => "123 Main St.",|
|
155
|
+
expected_line %|- "city" => "Oakland",|
|
156
|
+
actual_line %|+ "city" => "Hill Valley",|
|
157
|
+
plain_line %| "state" => "CA",|
|
158
|
+
expected_line %|- "zip" => "91234"|
|
159
|
+
actual_line %|+ "zip" => "90382"|
|
160
|
+
plain_line %| }>|
|
170
161
|
},
|
171
162
|
)
|
172
163
|
|
@@ -177,7 +168,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
177
168
|
end
|
178
169
|
end
|
179
170
|
|
180
|
-
context "and the actual
|
171
|
+
context "and the actual hash contains string keys" do
|
181
172
|
it "produces the correct output" do
|
182
173
|
as_both_colored_and_uncolored do |color_enabled|
|
183
174
|
snippet = <<~TEST.strip
|
@@ -187,7 +178,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
187
178
|
state: "CA",
|
188
179
|
zip: "91234",
|
189
180
|
})
|
190
|
-
actual
|
181
|
+
actual = {
|
191
182
|
"line_1" => "123 Main St.",
|
192
183
|
"city" => "Hill Valley",
|
193
184
|
"state" => "CA",
|
@@ -195,35 +186,32 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
195
186
|
}
|
196
187
|
expect(actual).to eq(expected)
|
197
188
|
TEST
|
198
|
-
program =
|
199
|
-
snippet,
|
200
|
-
color_enabled: color_enabled,
|
201
|
-
)
|
189
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
202
190
|
|
203
191
|
expected_output = build_expected_output(
|
204
192
|
color_enabled: color_enabled,
|
205
193
|
snippet: "expect(actual).to eq(expected)",
|
206
194
|
expectation: proc {
|
207
195
|
line do
|
208
|
-
plain
|
209
|
-
|
196
|
+
plain %|Expected |
|
197
|
+
actual %|{ "line_1" => "123 Main St.", "city" => "Hill Valley", "state" => "CA", "zip" => "90382" }|
|
210
198
|
end
|
211
199
|
|
212
200
|
line do
|
213
|
-
plain
|
214
|
-
|
201
|
+
plain %| to eq |
|
202
|
+
expected %|#<HashWithIndifferentAccess { "line_1" => "456 Ponderosa Ct.", "city" => "Oakland", "state" => "CA", "zip" => "91234" }>|
|
215
203
|
end
|
216
204
|
},
|
217
205
|
diff: proc {
|
218
|
-
plain_line
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
plain_line
|
224
|
-
|
225
|
-
|
226
|
-
plain_line
|
206
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
207
|
+
expected_line %|- "line_1" => "456 Ponderosa Ct.",|
|
208
|
+
actual_line %|+ "line_1" => "123 Main St.",|
|
209
|
+
expected_line %|- "city" => "Oakland",|
|
210
|
+
actual_line %|+ "city" => "Hill Valley",|
|
211
|
+
plain_line %| "state" => "CA",|
|
212
|
+
expected_line %|- "zip" => "91234"|
|
213
|
+
actual_line %|+ "zip" => "90382"|
|
214
|
+
plain_line %| }>|
|
227
215
|
},
|
228
216
|
)
|
229
217
|
|
@@ -250,7 +238,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
250
238
|
})
|
251
239
|
]
|
252
240
|
})
|
253
|
-
actual
|
241
|
+
actual = {
|
254
242
|
shipments: [
|
255
243
|
{
|
256
244
|
estimated_delivery: {
|
@@ -262,37 +250,34 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
262
250
|
}
|
263
251
|
expect(actual).to eq(expected)
|
264
252
|
TEST
|
265
|
-
program =
|
266
|
-
snippet,
|
267
|
-
color_enabled: color_enabled,
|
268
|
-
)
|
253
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
269
254
|
|
270
255
|
expected_output = build_expected_output(
|
271
256
|
color_enabled: color_enabled,
|
272
257
|
snippet: "expect(actual).to eq(expected)",
|
273
258
|
expectation: proc {
|
274
259
|
line do
|
275
|
-
plain
|
276
|
-
|
260
|
+
plain %|Expected |
|
261
|
+
actual %|{ shipments: [{ estimated_delivery: { from: "2019-05-06", to: "2019-05-09" } }] }|
|
277
262
|
end
|
278
263
|
|
279
264
|
line do
|
280
|
-
plain
|
281
|
-
|
265
|
+
plain %| to eq |
|
266
|
+
expected %|#<HashWithIndifferentAccess { "shipments" => [#<HashWithIndifferentAccess { "estimated_delivery" => #<HashWithIndifferentAccess { "from" => "2019-05-06", "to" => "2019-05-06" }> }>] }>|
|
282
267
|
end
|
283
268
|
},
|
284
269
|
diff: proc {
|
285
|
-
plain_line
|
286
|
-
plain_line
|
287
|
-
plain_line
|
288
|
-
plain_line
|
289
|
-
plain_line
|
290
|
-
|
291
|
-
|
292
|
-
plain_line
|
293
|
-
plain_line
|
294
|
-
plain_line
|
295
|
-
plain_line
|
270
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
271
|
+
plain_line %| "shipments" => [|
|
272
|
+
plain_line %| {|
|
273
|
+
plain_line %| "estimated_delivery" => {|
|
274
|
+
plain_line %| "from" => "2019-05-06",|
|
275
|
+
expected_line %|- "to" => "2019-05-06"|
|
276
|
+
actual_line %|+ "to" => "2019-05-09"|
|
277
|
+
plain_line %| }|
|
278
|
+
plain_line %| }|
|
279
|
+
plain_line %| ]|
|
280
|
+
plain_line %| }>|
|
296
281
|
},
|
297
282
|
)
|
298
283
|
|
@@ -303,7 +288,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
303
288
|
end
|
304
289
|
end
|
305
290
|
|
306
|
-
context "and the actual
|
291
|
+
context "and the actual hash contains string keys" do
|
307
292
|
it "produces the correct output" do
|
308
293
|
as_both_colored_and_uncolored do |color_enabled|
|
309
294
|
snippet = <<~TEST.strip
|
@@ -317,7 +302,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
317
302
|
})
|
318
303
|
]
|
319
304
|
})
|
320
|
-
actual
|
305
|
+
actual = {
|
321
306
|
'shipments' => [
|
322
307
|
{
|
323
308
|
'estimated_delivery' => {
|
@@ -329,37 +314,34 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
329
314
|
}
|
330
315
|
expect(actual).to eq(expected)
|
331
316
|
TEST
|
332
|
-
program =
|
333
|
-
snippet,
|
334
|
-
color_enabled: color_enabled,
|
335
|
-
)
|
317
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
336
318
|
|
337
319
|
expected_output = build_expected_output(
|
338
320
|
color_enabled: color_enabled,
|
339
321
|
snippet: "expect(actual).to eq(expected)",
|
340
322
|
expectation: proc {
|
341
323
|
line do
|
342
|
-
plain
|
343
|
-
|
324
|
+
plain %|Expected |
|
325
|
+
actual %|{ "shipments" => [{ "estimated_delivery" => { "from" => "2019-05-06", "to" => "2019-05-09" } }] }|
|
344
326
|
end
|
345
327
|
|
346
328
|
line do
|
347
|
-
plain
|
348
|
-
|
329
|
+
plain %| to eq |
|
330
|
+
expected %|#<HashWithIndifferentAccess { "shipments" => [#<HashWithIndifferentAccess { "estimated_delivery" => #<HashWithIndifferentAccess { "from" => "2019-05-06", "to" => "2019-05-06" }> }>] }>|
|
349
331
|
end
|
350
332
|
},
|
351
333
|
diff: proc {
|
352
|
-
plain_line
|
353
|
-
plain_line
|
354
|
-
plain_line
|
355
|
-
plain_line
|
356
|
-
plain_line
|
357
|
-
|
358
|
-
|
359
|
-
plain_line
|
360
|
-
plain_line
|
361
|
-
plain_line
|
362
|
-
plain_line
|
334
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
335
|
+
plain_line %| "shipments" => [|
|
336
|
+
plain_line %| {|
|
337
|
+
plain_line %| "estimated_delivery" => {|
|
338
|
+
plain_line %| "from" => "2019-05-06",|
|
339
|
+
expected_line %|- "to" => "2019-05-06"|
|
340
|
+
actual_line %|+ "to" => "2019-05-09"|
|
341
|
+
plain_line %| }|
|
342
|
+
plain_line %| }|
|
343
|
+
plain_line %| ]|
|
344
|
+
plain_line %| }>|
|
363
345
|
},
|
364
346
|
)
|
365
347
|
|
@@ -374,7 +356,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
374
356
|
end
|
375
357
|
|
376
358
|
describe "and RSpec's #match matcher" do
|
377
|
-
context "when the actual
|
359
|
+
context "when the actual value is a HashWithIndifferentAccess" do
|
378
360
|
context "and both hashes are one-dimensional" do
|
379
361
|
context "and the expected hash contains symbol keys" do
|
380
362
|
it "produces the correct output" do
|
@@ -386,7 +368,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
386
368
|
state: "CA",
|
387
369
|
zip: "90382",
|
388
370
|
}
|
389
|
-
actual
|
371
|
+
actual = HashWithIndifferentAccess.new({
|
390
372
|
line_1: "456 Ponderosa Ct.",
|
391
373
|
city: "Oakland",
|
392
374
|
state: "CA",
|
@@ -394,35 +376,32 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
394
376
|
})
|
395
377
|
expect(actual).to match(expected)
|
396
378
|
TEST
|
397
|
-
program =
|
398
|
-
snippet,
|
399
|
-
color_enabled: color_enabled,
|
400
|
-
)
|
379
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
401
380
|
|
402
381
|
expected_output = build_expected_output(
|
403
382
|
color_enabled: color_enabled,
|
404
383
|
snippet: "expect(actual).to match(expected)",
|
405
384
|
expectation: proc {
|
406
385
|
line do
|
407
|
-
plain
|
408
|
-
|
386
|
+
plain %|Expected |
|
387
|
+
actual %|#<HashWithIndifferentAccess { "line_1" => "456 Ponderosa Ct.", "city" => "Oakland", "state" => "CA", "zip" => "91234" }>|
|
409
388
|
end
|
410
389
|
|
411
390
|
line do
|
412
|
-
plain
|
413
|
-
|
391
|
+
plain %|to match |
|
392
|
+
expected %|{ line_1: "123 Main St.", city: "Hill Valley", state: "CA", zip: "90382" }|
|
414
393
|
end
|
415
394
|
},
|
416
395
|
diff: proc {
|
417
|
-
plain_line
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
plain_line
|
423
|
-
|
424
|
-
|
425
|
-
plain_line
|
396
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
397
|
+
expected_line %|- "line_1" => "123 Main St.",|
|
398
|
+
actual_line %|+ "line_1" => "456 Ponderosa Ct.",|
|
399
|
+
expected_line %|- "city" => "Hill Valley",|
|
400
|
+
actual_line %|+ "city" => "Oakland",|
|
401
|
+
plain_line %| "state" => "CA",|
|
402
|
+
expected_line %|- "zip" => "90382"|
|
403
|
+
actual_line %|+ "zip" => "91234"|
|
404
|
+
plain_line %| }>|
|
426
405
|
},
|
427
406
|
)
|
428
407
|
|
@@ -443,7 +422,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
443
422
|
"state" => "CA",
|
444
423
|
"zip" => "90382",
|
445
424
|
}
|
446
|
-
actual
|
425
|
+
actual = HashWithIndifferentAccess.new({
|
447
426
|
line_1: "456 Ponderosa Ct.",
|
448
427
|
city: "Oakland",
|
449
428
|
state: "CA",
|
@@ -451,35 +430,32 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
451
430
|
})
|
452
431
|
expect(actual).to match(expected)
|
453
432
|
TEST
|
454
|
-
program =
|
455
|
-
snippet,
|
456
|
-
color_enabled: color_enabled,
|
457
|
-
)
|
433
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
458
434
|
|
459
435
|
expected_output = build_expected_output(
|
460
436
|
color_enabled: color_enabled,
|
461
437
|
snippet: "expect(actual).to match(expected)",
|
462
438
|
expectation: proc {
|
463
439
|
line do
|
464
|
-
plain
|
465
|
-
|
440
|
+
plain %|Expected |
|
441
|
+
actual %|#<HashWithIndifferentAccess { "line_1" => "456 Ponderosa Ct.", "city" => "Oakland", "state" => "CA", "zip" => "91234" }>|
|
466
442
|
end
|
467
443
|
|
468
444
|
line do
|
469
|
-
plain
|
470
|
-
|
445
|
+
plain %|to match |
|
446
|
+
expected %|{ "line_1" => "123 Main St.", "city" => "Hill Valley", "state" => "CA", "zip" => "90382" }|
|
471
447
|
end
|
472
448
|
},
|
473
449
|
diff: proc {
|
474
|
-
plain_line
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
plain_line
|
480
|
-
|
481
|
-
|
482
|
-
plain_line
|
450
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
451
|
+
expected_line %|- "line_1" => "123 Main St.",|
|
452
|
+
actual_line %|+ "line_1" => "456 Ponderosa Ct.",|
|
453
|
+
expected_line %|- "city" => "Hill Valley",|
|
454
|
+
actual_line %|+ "city" => "Oakland",|
|
455
|
+
plain_line %| "state" => "CA",|
|
456
|
+
expected_line %|- "zip" => "90382"|
|
457
|
+
actual_line %|+ "zip" => "91234"|
|
458
|
+
plain_line %| }>|
|
483
459
|
},
|
484
460
|
)
|
485
461
|
|
@@ -494,7 +470,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
494
470
|
|
495
471
|
context "when the expected value is a HashWithIndifferentAccess" do
|
496
472
|
context "and both hashes are one-dimensional" do
|
497
|
-
context "and the actual
|
473
|
+
context "and the actual hash contains symbol keys" do
|
498
474
|
it "produces the correct output" do
|
499
475
|
as_both_colored_and_uncolored do |color_enabled|
|
500
476
|
snippet = <<~TEST.strip
|
@@ -504,7 +480,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
504
480
|
state: "CA",
|
505
481
|
zip: "91234",
|
506
482
|
})
|
507
|
-
actual
|
483
|
+
actual = {
|
508
484
|
line_1: "123 Main St.",
|
509
485
|
city: "Hill Valley",
|
510
486
|
state: "CA",
|
@@ -512,35 +488,32 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
512
488
|
}
|
513
489
|
expect(actual).to match(expected)
|
514
490
|
TEST
|
515
|
-
program =
|
516
|
-
snippet,
|
517
|
-
color_enabled: color_enabled,
|
518
|
-
)
|
491
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
519
492
|
|
520
493
|
expected_output = build_expected_output(
|
521
494
|
color_enabled: color_enabled,
|
522
495
|
snippet: "expect(actual).to match(expected)",
|
523
496
|
expectation: proc {
|
524
497
|
line do
|
525
|
-
plain
|
526
|
-
|
498
|
+
plain %|Expected |
|
499
|
+
actual %|{ line_1: "123 Main St.", city: "Hill Valley", state: "CA", zip: "90382" }|
|
527
500
|
end
|
528
501
|
|
529
502
|
line do
|
530
|
-
plain
|
531
|
-
|
503
|
+
plain %|to match |
|
504
|
+
expected %|#<HashWithIndifferentAccess { "line_1" => "456 Ponderosa Ct.", "city" => "Oakland", "state" => "CA", "zip" => "91234" }>|
|
532
505
|
end
|
533
506
|
},
|
534
507
|
diff: proc {
|
535
|
-
plain_line
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
plain_line
|
541
|
-
|
542
|
-
|
543
|
-
plain_line
|
508
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
509
|
+
expected_line %|- "line_1" => "456 Ponderosa Ct.",|
|
510
|
+
actual_line %|+ "line_1" => "123 Main St.",|
|
511
|
+
expected_line %|- "city" => "Oakland",|
|
512
|
+
actual_line %|+ "city" => "Hill Valley",|
|
513
|
+
plain_line %| "state" => "CA",|
|
514
|
+
expected_line %|- "zip" => "91234"|
|
515
|
+
actual_line %|+ "zip" => "90382"|
|
516
|
+
plain_line %| }>|
|
544
517
|
},
|
545
518
|
)
|
546
519
|
|
@@ -551,7 +524,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
551
524
|
end
|
552
525
|
end
|
553
526
|
|
554
|
-
context "and the actual
|
527
|
+
context "and the actual hash contains string keys" do
|
555
528
|
it "produces the correct output" do
|
556
529
|
as_both_colored_and_uncolored do |color_enabled|
|
557
530
|
snippet = <<~TEST.strip
|
@@ -561,7 +534,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
561
534
|
state: "CA",
|
562
535
|
zip: "91234",
|
563
536
|
})
|
564
|
-
actual
|
537
|
+
actual = {
|
565
538
|
"line_1" => "123 Main St.",
|
566
539
|
"city" => "Hill Valley",
|
567
540
|
"state" => "CA",
|
@@ -569,35 +542,32 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
569
542
|
}
|
570
543
|
expect(actual).to match(expected)
|
571
544
|
TEST
|
572
|
-
program =
|
573
|
-
snippet,
|
574
|
-
color_enabled: color_enabled,
|
575
|
-
)
|
545
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
576
546
|
|
577
547
|
expected_output = build_expected_output(
|
578
548
|
color_enabled: color_enabled,
|
579
549
|
snippet: "expect(actual).to match(expected)",
|
580
550
|
expectation: proc {
|
581
551
|
line do
|
582
|
-
plain
|
583
|
-
|
552
|
+
plain %|Expected |
|
553
|
+
actual %|{ "line_1" => "123 Main St.", "city" => "Hill Valley", "state" => "CA", "zip" => "90382" }|
|
584
554
|
end
|
585
555
|
|
586
556
|
line do
|
587
|
-
plain
|
588
|
-
|
557
|
+
plain %|to match |
|
558
|
+
expected %|#<HashWithIndifferentAccess { "line_1" => "456 Ponderosa Ct.", "city" => "Oakland", "state" => "CA", "zip" => "91234" }>|
|
589
559
|
end
|
590
560
|
},
|
591
561
|
diff: proc {
|
592
|
-
plain_line
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
plain_line
|
598
|
-
|
599
|
-
|
600
|
-
plain_line
|
562
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
563
|
+
expected_line %|- "line_1" => "456 Ponderosa Ct.",|
|
564
|
+
actual_line %|+ "line_1" => "123 Main St.",|
|
565
|
+
expected_line %|- "city" => "Oakland",|
|
566
|
+
actual_line %|+ "city" => "Hill Valley",|
|
567
|
+
plain_line %| "state" => "CA",|
|
568
|
+
expected_line %|- "zip" => "91234"|
|
569
|
+
actual_line %|+ "zip" => "90382"|
|
570
|
+
plain_line %| }>|
|
601
571
|
},
|
602
572
|
)
|
603
573
|
|
@@ -610,7 +580,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
610
580
|
end
|
611
581
|
|
612
582
|
context "and both hashes are multi-dimensional" do
|
613
|
-
context "and the actual
|
583
|
+
context "and the actual hash contains symbol keys" do
|
614
584
|
it "produces the correct output" do
|
615
585
|
as_both_colored_and_uncolored do |color_enabled|
|
616
586
|
snippet = <<~TEST.strip
|
@@ -624,7 +594,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
624
594
|
})
|
625
595
|
]
|
626
596
|
})
|
627
|
-
actual
|
597
|
+
actual = {
|
628
598
|
shipments: [
|
629
599
|
{
|
630
600
|
estimated_delivery: {
|
@@ -636,37 +606,34 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
636
606
|
}
|
637
607
|
expect(actual).to match(expected)
|
638
608
|
TEST
|
639
|
-
program =
|
640
|
-
snippet,
|
641
|
-
color_enabled: color_enabled,
|
642
|
-
)
|
609
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
643
610
|
|
644
611
|
expected_output = build_expected_output(
|
645
612
|
color_enabled: color_enabled,
|
646
613
|
snippet: "expect(actual).to match(expected)",
|
647
614
|
expectation: proc {
|
648
615
|
line do
|
649
|
-
plain
|
650
|
-
|
616
|
+
plain %|Expected |
|
617
|
+
actual %|{ shipments: [{ estimated_delivery: { from: "2019-05-06", to: "2019-05-09" } }] }|
|
651
618
|
end
|
652
619
|
|
653
620
|
line do
|
654
|
-
plain
|
655
|
-
|
621
|
+
plain %|to match |
|
622
|
+
expected %|#<HashWithIndifferentAccess { "shipments" => [#<HashWithIndifferentAccess { "estimated_delivery" => #<HashWithIndifferentAccess { "from" => "2019-05-06", "to" => "2019-05-06" }> }>] }>|
|
656
623
|
end
|
657
624
|
},
|
658
625
|
diff: proc {
|
659
|
-
plain_line
|
660
|
-
plain_line
|
661
|
-
plain_line
|
662
|
-
plain_line
|
663
|
-
plain_line
|
664
|
-
|
665
|
-
|
666
|
-
plain_line
|
667
|
-
plain_line
|
668
|
-
plain_line
|
669
|
-
plain_line
|
626
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
627
|
+
plain_line %| "shipments" => [|
|
628
|
+
plain_line %| {|
|
629
|
+
plain_line %| "estimated_delivery" => {|
|
630
|
+
plain_line %| "from" => "2019-05-06",|
|
631
|
+
expected_line %|- "to" => "2019-05-06"|
|
632
|
+
actual_line %|+ "to" => "2019-05-09"|
|
633
|
+
plain_line %| }|
|
634
|
+
plain_line %| }|
|
635
|
+
plain_line %| ]|
|
636
|
+
plain_line %| }>|
|
670
637
|
},
|
671
638
|
)
|
672
639
|
|
@@ -677,7 +644,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
677
644
|
end
|
678
645
|
end
|
679
646
|
|
680
|
-
context "and the actual
|
647
|
+
context "and the actual hash contains string keys" do
|
681
648
|
it "produces the correct output" do
|
682
649
|
as_both_colored_and_uncolored do |color_enabled|
|
683
650
|
snippet = <<~TEST.strip
|
@@ -691,7 +658,7 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
691
658
|
})
|
692
659
|
]
|
693
660
|
})
|
694
|
-
actual
|
661
|
+
actual = {
|
695
662
|
'shipments' => [
|
696
663
|
{
|
697
664
|
'estimated_delivery' => {
|
@@ -703,37 +670,34 @@ shared_examples_for "integration with HashWithIndifferentAccess" do
|
|
703
670
|
}
|
704
671
|
expect(actual).to match(expected)
|
705
672
|
TEST
|
706
|
-
program =
|
707
|
-
snippet,
|
708
|
-
color_enabled: color_enabled,
|
709
|
-
)
|
673
|
+
program = make_program(snippet, color_enabled: color_enabled)
|
710
674
|
|
711
675
|
expected_output = build_expected_output(
|
712
676
|
color_enabled: color_enabled,
|
713
677
|
snippet: "expect(actual).to match(expected)",
|
714
678
|
expectation: proc {
|
715
679
|
line do
|
716
|
-
plain
|
717
|
-
|
680
|
+
plain %|Expected |
|
681
|
+
actual %|{ "shipments" => [{ "estimated_delivery" => { "from" => "2019-05-06", "to" => "2019-05-09" } }] }|
|
718
682
|
end
|
719
683
|
|
720
684
|
line do
|
721
|
-
plain
|
722
|
-
|
685
|
+
plain %|to match |
|
686
|
+
expected %|#<HashWithIndifferentAccess { "shipments" => [#<HashWithIndifferentAccess { "estimated_delivery" => #<HashWithIndifferentAccess { "from" => "2019-05-06", "to" => "2019-05-06" }> }>] }>|
|
723
687
|
end
|
724
688
|
},
|
725
689
|
diff: proc {
|
726
|
-
plain_line
|
727
|
-
plain_line
|
728
|
-
plain_line
|
729
|
-
plain_line
|
730
|
-
plain_line
|
731
|
-
|
732
|
-
|
733
|
-
plain_line
|
734
|
-
plain_line
|
735
|
-
plain_line
|
736
|
-
plain_line
|
690
|
+
plain_line %| #<HashWithIndifferentAccess {|
|
691
|
+
plain_line %| "shipments" => [|
|
692
|
+
plain_line %| {|
|
693
|
+
plain_line %| "estimated_delivery" => {|
|
694
|
+
plain_line %| "from" => "2019-05-06",|
|
695
|
+
expected_line %|- "to" => "2019-05-06"|
|
696
|
+
actual_line %|+ "to" => "2019-05-09"|
|
697
|
+
plain_line %| }|
|
698
|
+
plain_line %| }|
|
699
|
+
plain_line %| ]|
|
700
|
+
plain_line %| }>|
|
737
701
|
},
|
738
702
|
)
|
739
703
|
|