Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
## Copyright 2009 Rex Luther Corporation.
## Licensed under the MIT License
it "should require a phone number have a valid format" do = '(919) 555-1212'
@contact.should be_valid = '919-555-1212'
@contact.should be_valid = '919.555.1212'
@contact.should be_valid = '919-555-121'
@contact.should_not be_valid
it "should allow phone numbers to use an extention " do = '919-555-1212 x1234'
@contact.should be_valid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment