ethos 0.2.0.beta6 → 0.2.0.beta7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ethos/type.rb +2 -0
- data/lib/ethos/version.rb +1 -1
- data/spec/ethos/type.rb +7 -0
- 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: 9335ed3374ed7cc4b506193942250129d94a898e
|
4
|
+
data.tar.gz: 9bb3226db9720f6307398e68fbf395d2bed69dde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec69f3cd21d22b4d082c5f5ad1c8823a5cfb5aac30fa5831d7b3ae4659ad0e98f7bf29d44239fe3ce12e8c42c14916bf9df803810646891b4e19726d685c3410
|
7
|
+
data.tar.gz: 5766fca046926bf658ac8444c91bd6ee24dc38e89f1d1f21d904032bbe47c5370d8a42a3b44c0bddc028df62de4f557ef79fc80acb925d3605dd6c5ae9f813f2
|
data/lib/ethos/type.rb
CHANGED
data/lib/ethos/version.rb
CHANGED
data/spec/ethos/type.rb
CHANGED
@@ -90,6 +90,13 @@ scope '.cast' do
|
|
90
90
|
asserts(result.value) == expected.value
|
91
91
|
end
|
92
92
|
|
93
|
+
spec 'casts to an instance of a type specified by a string' do
|
94
|
+
expected = 1.0
|
95
|
+
result = Ethos::Type.cast '1', 'Float'
|
96
|
+
|
97
|
+
asserts(result) == expected
|
98
|
+
end
|
99
|
+
|
93
100
|
spec 'casts a nil' do
|
94
101
|
class Entity
|
95
102
|
prepend Ethos::Entity
|