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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e966dabb162b838c6921e31ce9e2cbd44a72a4d0
4
- data.tar.gz: daac80eadaead1f814f3dcda8819edc92df9f995
3
+ metadata.gz: dd3066f85666a6f4e3a7fc1acedddd10e00e7719
4
+ data.tar.gz: fc7d204a77b05fb9647587803ad981cf03bffd08
5
5
  SHA512:
6
- metadata.gz: 29c9e8766c758e4766e86b7f484ce0bddabe0b23ab89eccb19b139b240dc1fe83df652e5895032df9bb57867066955a578ae1992092efe2248c949ec83f37b9f
7
- data.tar.gz: d4f385816b1a78247af796816d8db90894294eabc8faae071d631a3edba78fc0a785b7f4c9721f487616c489139d660a59d04445af15dec70b6ad00b385eb251
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
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Dry
3
3
  module Struct
4
- VERSION = '0.2.1'.freeze
4
+ VERSION = '0.2.2'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-dry-struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Kukunin