delegate_matcher 0.4 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e342a7ea43c74991c773ae7093fd017383dd22e
4
- data.tar.gz: f9b3cec53a47692c6b65ca529b46a59bc89a8a68
3
+ metadata.gz: 105eec3e18f2ea40bd320dd1d1f74950be80fae3
4
+ data.tar.gz: f72c454e7faa63495c2a8938ba5ebd42772d600b
5
5
  SHA512:
6
- metadata.gz: 4a91f85a9c888ea5e659c1dbdeeac00a0395eabf55149beba29a3d123bd22d38e6e5d1a209df6e3a747483b1a6e22dfe158aea9834f7c62e79d44e00c57bf6b7
7
- data.tar.gz: f2c93b90808e178b51b6ac52bffc6e7ff62473397618371c258b5f1c6421683b652a3cac70a4128213f7ad9544b1df1f51956492498f68530406ffd2304d177a
6
+ metadata.gz: 89947002c86c4f5986bdcadf6f55abca78cc2f2023f821725895bf891339c204fb569860c93ca43332b3b853ec141f7d59a8e0201baf16592d48dd86faab7cf6
7
+ data.tar.gz: 53e80e2d40604ede3836dad8545ed58bb89c9cf8d845faf27915ef413146132a83f0a61a989a4099dc393495a61721335b2ed062aa844228bce34b7b33b9a147
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- delegate_matcher (0.4)
4
+ delegate_matcher (0.4.1)
5
5
  proc_extensions (~> 0.2)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -309,10 +309,6 @@ module ForwardableDelegation
309
309
  def_delegator :author, :name, :writer
310
310
 
311
311
  def_delegator :'author.name', :length, :name_length
312
-
313
- def inspect
314
- 'post'
315
- end
316
312
  end
317
313
 
318
314
  class Author
@@ -1,3 +1,3 @@
1
1
  module DelegateMatcher
2
- VERSION ||= '0.4'.freeze
2
+ VERSION ||= '0.4.1'.freeze
3
3
  end
@@ -15,10 +15,6 @@ module ForwardableDelegation
15
15
  def_delegator :author, :name, :writer
16
16
 
17
17
  def_delegator :'author.name', :length, :name_length
18
-
19
- def inspect
20
- 'post'
21
- end
22
18
  end
23
19
 
24
20
  class Author
@@ -13,10 +13,6 @@ module RSpec
13
13
  def initialize
14
14
  @author = Author.new
15
15
  end
16
-
17
- def name
18
- @author.name
19
- end
20
16
  end
21
17
  end
22
18
 
@@ -31,8 +27,6 @@ module RSpec
31
27
  return klass.description if klass.respond_to?(:description) && klass.description =~ /def \w*name/
32
28
  klass = klass.parent
33
29
  end
34
-
35
- '# Could not find "def \w*name..." method definition'
36
30
  end
37
31
 
38
32
  let(:matcher) { delegate(:name).to(:@author) }
@@ -39,6 +39,10 @@ module RSpec
39
39
  expect { should delegate(:name).to(author).allow_nil(false) }.to \
40
40
  raise_error RuntimeError, 'cannot verify "allow_nil" expectations when delegating to an object'
41
41
  end
42
+
43
+ it 'prefex should be ignored' do
44
+ should delegate(:name).to(author).with_prefix
45
+ end
42
46
  end
43
47
  end
44
48
  end
data/spec/with_to_spec.rb CHANGED
@@ -7,18 +7,6 @@ module RSpec
7
7
  let(:klass) do
8
8
  Class.new do
9
9
  include PostMethods
10
-
11
- def initialize
12
- @author = Author.new
13
- end
14
-
15
- def name
16
- @author.name
17
- end
18
-
19
- def name_allow_nil
20
- @author.name if @author
21
- end
22
10
  end
23
11
  end
24
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delegate_matcher
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Declan Whelan