no_phone 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- no_phone (0.0.5)
4
+ no_phone (0.0.7)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module NoPhone
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -1,41 +1,41 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe NoPhone, "#valid?" do
3
+ describe NoPhone, "#number_valid?" do
4
4
  it "is invalid if nil" do
5
- NoPhoneWrapper.valid?(nil).should be_false
5
+ NoPhoneWrapper.number_valid?(nil).should be_false
6
6
  end
7
7
 
8
8
  it "is invalid if blank" do
9
- NoPhoneWrapper.valid?("").should be_false
9
+ NoPhoneWrapper.number_valid?("").should be_false
10
10
  end
11
11
 
12
12
  it "is invalid with letters" do
13
- NoPhoneWrapper.valid?("1abc2").should be_false
13
+ NoPhoneWrapper.number_valid?("1abc2").should be_false
14
14
  end
15
15
 
16
16
  context "with funky characters" do
17
17
  it "rejects parens" do
18
- NoPhoneWrapper.valid?("123(45)678").should be_false
18
+ NoPhoneWrapper.number_valid?("123(45)678").should be_false
19
19
  end
20
20
 
21
21
  it "rejects hyphens" do
22
- NoPhoneWrapper.valid?("123-45-678").should be_false
22
+ NoPhoneWrapper.number_valid?("123-45-678").should be_false
23
23
  end
24
24
 
25
25
  it "rejects periods" do
26
- NoPhoneWrapper.valid?("123.45.678").should be_false
26
+ NoPhoneWrapper.number_valid?("123.45.678").should be_false
27
27
  end
28
28
 
29
29
  it "rejects +sign in the middle" do
30
- NoPhoneWrapper.valid?("123+45+678").should be_false
30
+ NoPhoneWrapper.number_valid?("123+45+678").should be_false
31
31
  end
32
32
 
33
33
  it "accepts spaces" do
34
- NoPhoneWrapper.valid?("123 45 678").should be_true
34
+ NoPhoneWrapper.number_valid?("123 45 678").should be_true
35
35
  end
36
36
 
37
37
  it "accepts +sign in the beginning" do
38
- NoPhoneWrapper.valid?("+123 45 678").should be_true
38
+ NoPhoneWrapper.number_valid?("+123 45 678").should be_true
39
39
  end
40
40
  end
41
41
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Simen Svale Skogsrud, Katrina Owen
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-07-15 00:00:00 +02:00
17
+ date: 2011-09-15 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency