Skip to content

Instantly share code, notes, and snippets.

@SpencerCooley
Created June 8, 2011 20:52
Show Gist options
  • Save SpencerCooley/1015367 to your computer and use it in GitHub Desktop.
Save SpencerCooley/1015367 to your computer and use it in GitHub Desktop.
test "image url" do
ok= %w{ fred.gif fred.png fred.png FRED.JPG FRED.Jpg
http://a.b.c/x/y/z/fred.gif}
bad=%w{ fred.gif/hello fred.gif.hello fred.doc }
ok.each do |name|
assert new_product(name).valid? "#{name} shouldn't be invalid"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment