use_case 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- use_case (1.0.0)
15
+ use_case (1.0.1)
16
16
 
17
17
  GEM
18
18
  remote: http://rubygems.org/
@@ -38,6 +38,10 @@ module UseCase
38
38
  @target.send(name, *args, &block)
39
39
  end
40
40
 
41
+ def respond_to_missing?(name, include_all)
42
+ @target.respond_to?(name)
43
+ end
44
+
41
45
  def self.call(object)
42
46
  validator = new(object)
43
47
  validator.valid?
@@ -24,5 +24,5 @@
24
24
  #++
25
25
 
26
26
  module UseCase
27
- VERSION = "1.0.0"
27
+ VERSION = "1.0.1"
28
28
  end
@@ -42,6 +42,15 @@ class Person
42
42
  end
43
43
 
44
44
  describe UseCase::Validator do
45
+ it "delegates all calls to underlying object" do
46
+ person = Person.new
47
+ person.name = "Christian"
48
+ result = NewPersonValidator.call(person)
49
+
50
+ assert result.respond_to?(:name)
51
+ assert_equal "Christian", result.name
52
+ end
53
+
45
54
  it "passes valid object" do
46
55
  person = Person.new
47
56
  person.name = "Christian"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: use_case
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-10 00:00:00.000000000 Z
12
+ date: 2013-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest