rspec-dry-struct 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspec/dry/struct/matcher.rb +8 -0
- data/lib/rspec/dry/struct/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd3066f85666a6f4e3a7fc1acedddd10e00e7719
|
4
|
+
data.tar.gz: fc7d204a77b05fb9647587803ad981cf03bffd08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5533acb4d92664a601c7c6eb70afde3b608f386c3a9ed1719a70f7a8a9c02989e0cd0d700eaba9aee32b4500ad712edfc1025000d464531756c3da192047ee5
|
7
|
+
data.tar.gz: 668586de5a050bc3c95f45f1077e93eb63233892686ed6e01cce22254702607d5152c34632e63cf628b1e369689014327643e97f6ebdaf6252ec5fd1885f5734
|
@@ -24,6 +24,10 @@ module RSpec
|
|
24
24
|
attr_type_mismatch_message(@actual)
|
25
25
|
end
|
26
26
|
|
27
|
+
def failure_message_when_negated
|
28
|
+
"#{unexpected_message(@actual)}, but it was found"
|
29
|
+
end
|
30
|
+
|
27
31
|
private
|
28
32
|
|
29
33
|
def attr_present?
|
@@ -45,6 +49,10 @@ module RSpec
|
|
45
49
|
def expected_message(actual)
|
46
50
|
"expected #{actual} to have #{@attr_name.inspect} attribute"
|
47
51
|
end
|
52
|
+
|
53
|
+
def unexpected_message(actual)
|
54
|
+
expected_message(actual).gsub('to have', 'to not have')
|
55
|
+
end
|
48
56
|
end
|
49
57
|
end
|
50
58
|
end
|