Skip to content

Instantly share code, notes, and snippets.

@jlogsdon
Created May 15, 2012 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlogsdon/2703527 to your computer and use it in GitHub Desktop.
Save jlogsdon/2703527 to your computer and use it in GitHub Desktop.
describe '#valid_ip' do
it 'returns true given a valid IP address' do
subject.valid_ip('192.168.1.1').should be_true
# Throw several valid IPs here
end
it 'returns false given an invalid IP address' do
subject.valid_ip('fake').should be_false
# Throw several invalid IPs here
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment