scrivener_errors 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scrivener_errors.rb +3 -1
- data/scrivener_errors.gemspec +1 -1
- data/test/scrivener_errors_test.rb +8 -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: fe0b9e26051ed12937cef5a124871ea6bb8a89ff
|
4
|
+
data.tar.gz: 491fddb121f4f4b27814966df0378c0cf080bfb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cacf2a21d8cbb1197876194853dd273dcc2f5998d9a72b01066008c52290070afad5354c89542eea483af0274675f7b8c4d7b27be9b73923b782bdc189cf49b3
|
7
|
+
data.tar.gz: 5f0a102ff76696a734e70695c87aa70c6f46e6a979af093f07d4389d1f00177b5a450e1eab53c7f5fad7583d1fae24daa731a8f73d8791fa618656d76ddd49d0
|
data/lib/scrivener_errors.rb
CHANGED
data/scrivener_errors.gemspec
CHANGED
@@ -71,6 +71,14 @@ scope do
|
|
71
71
|
"has invalid length, is invalid",
|
72
72
|
ScrivenerErrors.new(filter)[:password])
|
73
73
|
end
|
74
|
+
|
75
|
+
test "returning nil when an attribute has no errors" do
|
76
|
+
filter = SignUp.new(email: 'john@example.com',
|
77
|
+
password: ' x',
|
78
|
+
password_confirmation: 'y')
|
79
|
+
|
80
|
+
assert_equal(nil, ScrivenerErrors.new(filter)[:email])
|
81
|
+
end
|
74
82
|
end
|
75
83
|
|
76
84
|
scope do
|