optionable 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/optionable/validator.rb +1 -1
- data/lib/optionable/version.rb +1 -1
- data/spec/optionable_spec.rb +3 -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: 198b619f4a71038fcb8f5d2b7b0beb81d393f408
|
4
|
+
data.tar.gz: f5d4a0df739bc012faa4e5edd3f646f0c857af6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e34e673ddc316c189d90b07e557b70574f6e7f80cb4c234deb002bd8df6cdd9b2ddd697c619ef1557a4effb086aa69c867e61052d7c9e75e982ceebb9cf65318
|
7
|
+
data.tar.gz: 9bfe6a413779ad23accb7991aef7919cf59cb43a80908f00e4a2b073d1ae0b21e06a9e0712fcfc9023cc1e5263ed4d357b44840df49ed3c5a09d650ee448f5b8
|
data/lib/optionable/validator.rb
CHANGED
data/lib/optionable/version.rb
CHANGED
data/spec/optionable_spec.rb
CHANGED
@@ -11,6 +11,7 @@ describe Optionable do
|
|
11
11
|
option(:update).allow(int: Optionable.any(Integer))
|
12
12
|
option(:update).allow(str: "exact")
|
13
13
|
option(:update).allow(flt: 10.5)
|
14
|
+
option(:name).allow(Optionable.any(String))
|
14
15
|
|
15
16
|
def initialize(options = {})
|
16
17
|
validate_strict(options)
|
@@ -58,7 +59,8 @@ describe Optionable do
|
|
58
59
|
|
59
60
|
it "does not raise an error for correct type" do
|
60
61
|
expect {
|
61
|
-
Model.new(write: 10)
|
62
|
+
# Model.new(write: 10)
|
63
|
+
Model.new(name: "test")
|
62
64
|
}.to_not raise_error
|
63
65
|
end
|
64
66
|
end
|