super_diff 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5427cb2217992c9dffd57826837caaa750ddcd422625498c3bca9cf40ae8e32
|
4
|
+
data.tar.gz: 540a3e3ea47bc98c4abf45ff6ff216563f70f1492bb2c06a54525b6414b306ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bf06c03ce556532384242e0193628bae55134e3edf65003e1d0b7a1015e25af6f9ce68bd23a7ca2ebadddb0093103a643f9bb742116d2456f20146bb948f380
|
7
|
+
data.tar.gz: c32489d6915ac9f7fc3cf1c0427683977b3a569a99e36a7d8e47f1209e74efcf3f86b3986b1e40ed51d2321d89f1e8530bdda79352c1d53fd94798370f2261de
|
data/lib/super_diff/version.rb
CHANGED
@@ -369,4 +369,46 @@ RSpec.describe "Integration with RSpec's #match_array matcher", type: :integrati
|
|
369
369
|
end
|
370
370
|
end
|
371
371
|
end
|
372
|
+
|
373
|
+
context "when the input value is a string" do
|
374
|
+
it "produces the correct failure message when used in the positive" do
|
375
|
+
as_both_colored_and_uncolored do |color_enabled|
|
376
|
+
snippet = <<~TEST.strip
|
377
|
+
expected = "Einie"
|
378
|
+
actual = ["Marty", "Jennifer", "Doc"]
|
379
|
+
expect(actual).to match_array(expected)
|
380
|
+
TEST
|
381
|
+
program = make_plain_test_program(
|
382
|
+
snippet,
|
383
|
+
color_enabled: color_enabled,
|
384
|
+
)
|
385
|
+
|
386
|
+
expected_output = build_expected_output(
|
387
|
+
color_enabled: color_enabled,
|
388
|
+
snippet: %|expect(actual).to match_array(expected)|,
|
389
|
+
expectation: proc {
|
390
|
+
line do
|
391
|
+
plain "Expected "
|
392
|
+
beta %|["Marty", "Jennifer", "Doc"]|
|
393
|
+
plain " to match array with "
|
394
|
+
alpha %|"Einie"|
|
395
|
+
plain "."
|
396
|
+
end
|
397
|
+
},
|
398
|
+
diff: proc {
|
399
|
+
plain_line %| [|
|
400
|
+
plain_line %| "Marty",|
|
401
|
+
plain_line %| "Jennifer",|
|
402
|
+
plain_line %| "Doc",|
|
403
|
+
alpha_line %|- "Einie"|
|
404
|
+
plain_line %| ]|
|
405
|
+
},
|
406
|
+
)
|
407
|
+
|
408
|
+
expect(program).
|
409
|
+
to produce_output_when_run(expected_output).
|
410
|
+
in_color(color_enabled)
|
411
|
+
end
|
412
|
+
end
|
413
|
+
end
|
372
414
|
end
|
data/super_diff.gemspec
CHANGED
@@ -7,6 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.email = ["elliot.winkler@gmail.com"]
|
8
8
|
s.homepage = "https://github.com/mcmire/super_diff"
|
9
9
|
s.summary = "A better way to view differences between complex data structures in RSpec."
|
10
|
+
s.license = "MIT"
|
10
11
|
s.description = <<~DESC
|
11
12
|
SuperDiff is a gem that hooks into RSpec to intelligently display the
|
12
13
|
differences between two data structures of any type.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super_diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Winkler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: attr_extras
|
@@ -285,7 +285,8 @@ files:
|
|
285
285
|
- spec/unit/rspec/matchers/respond_to_spec.rb
|
286
286
|
- super_diff.gemspec
|
287
287
|
homepage: https://github.com/mcmire/super_diff
|
288
|
-
licenses:
|
288
|
+
licenses:
|
289
|
+
- MIT
|
289
290
|
metadata: {}
|
290
291
|
post_install_message:
|
291
292
|
rdoc_options: []
|