activemodel-url_validator 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bae84fcd1d6d45196a3c26227939face9d9cfe6
4
- data.tar.gz: 92eb6f02caa3c8a11297a5d2cefa4c5caaa97262
3
+ metadata.gz: 4bb9989541a1701bf58e3139b0cdaa378cd7159e
4
+ data.tar.gz: a10a1ca6edafe7030c78f507cfce35440f93e110
5
5
  SHA512:
6
- metadata.gz: 4166f3b5878a7c02736e8cd776753811a938f883b468715e783167169d31b007f11d621ffdedeac681a0c642db252707faee6156b03ed8b9496bc25d91f84b45
7
- data.tar.gz: 07e8f27dc5a60b58c37e26e1efeb0fa3c5111302ab612af9e04663c28ee8562b3102c254a93cb9d243baf2394b3bcf606d88cff19502dba0cdca2199f1a86538
6
+ metadata.gz: ab1d276a1d70a73bfe79e00a40aecdea10292c6eeb8adb0cef9bcb1dad4e8a8c53f169daf9be50215416c61794eff044ac922f3c5fd682461916fdf7a48bdbe7
7
+ data.tar.gz: fa0360c7b91e6549efdc610681e7bcd1997931ebb20f92ac9904ea4e400a560e1262ae52e8f679af8b4a1e29a5efb90a29744b325772a6b18284e034a4dbe696
@@ -1,2 +1,3 @@
1
+ require 'url_validator'
1
2
  require 'url_validator/version'
2
3
  require 'url_validator/engine'
@@ -1,3 +1,3 @@
1
1
  class UrlValidator
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -14,6 +14,12 @@ shared_examples_for 'scheme less value is given', given: :scheme_less do
14
14
  end
15
15
  end
16
16
 
17
+ shared_examples_for 'empty string is given', given: :empty do
18
+ let(:value) do
19
+ ''
20
+ end
21
+ end
22
+
17
23
  shared_examples_for 'host less value is given', given: :host_less do
18
24
  let(:value) do
19
25
  'http:///host/less'
@@ -68,7 +74,11 @@ describe UrlValidator do
68
74
  options
69
75
  end
70
76
 
71
- context 'when invalid value is given', given: :invalid do
77
+ context 'when an empty string is given', given: :empty do
78
+ it { should be_falsey }
79
+ end
80
+
81
+ context 'when an invalid value is given', given: :invalid do
72
82
  it { should be_falsey }
73
83
  end
74
84
 
@@ -133,6 +143,10 @@ describe UrlValidator do
133
143
  it { should be_invalid }
134
144
  end
135
145
 
146
+ context 'and an empty string is given', given: :empty do
147
+ it { should be_invalid }
148
+ end
149
+
136
150
  context 'and a valid http value is given', given: :http do
137
151
  it { should be_valid }
138
152
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel-url_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuku Takahashi