Skip to content

Instantly share code, notes, and snippets.

@seban
Created August 14, 2014 09:31
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 seban/1ffd9847a75bcef6328d to your computer and use it in GitHub Desktop.
Save seban/1ffd9847a75bcef6328d to your computer and use it in GitHub Desktop.
class Profile < ActiveRecord::Base
validates :facebook_profile, url: { allow_blank: true }
end
# failing spec
specify "www.facebook.com/username should be valid facebook profile url" do
profile.facebook_profile = "www.facebook.com/username"
expect(profile).to be_valid
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment