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 +1 -1
- data/lib/use_case/validator.rb +4 -0
- data/lib/use_case/version.rb +1 -1
- data/test/use_case/validator_test.rb +9 -0
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/use_case/validator.rb
CHANGED
data/lib/use_case/version.rb
CHANGED
@@ -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.
|
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-
|
12
|
+
date: 2013-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|