Commit 7dd35f58 by Jon Yurek

Fixed the ENOENT test and a dumb typo.

parent c40d947e
...@@ -18,7 +18,7 @@ module Paperclip ...@@ -18,7 +18,7 @@ module Paperclip
def self.from_file file def self.from_file file
file = file.path if file.respond_to? "path" file = file.path if file.respond_to? "path"
parse(`#{Paperclip.path_for_command('identify')} "#{file}"`) || parse(`#{Paperclip.path_for_command('identify')} "#{file}"`) ||
raise NotIdentifiedByImageMagickError, "#{file} is not recognized by the 'identify' command." raise(NotIdentifiedByImageMagickError.new("#{file} is not recognized by the 'identify' command."))
end end
# Parses a "WxH" formatted string, where W is the width and H is the height. # Parses a "WxH" formatted string, where W is the width and H is the height.
......
...@@ -82,7 +82,7 @@ class GeometryTest < Test::Unit::TestCase ...@@ -82,7 +82,7 @@ class GeometryTest < Test::Unit::TestCase
should "not generate from a bad file" do should "not generate from a bad file" do
file = "/home/This File Does Not Exist.omg" file = "/home/This File Does Not Exist.omg"
assert_raise(Errno::ENOENT){ @geo = Paperclip::Geometry.from_file(file) } assert_raise(Paperclip::NotIdentifiedByImageMagick){ @geo = Paperclip::Geometry.from_file(file) }
end end
[['vertical', 900, 1440, true, false, false, 1440, 900, 0.625], [['vertical', 900, 1440, true, false, false, 1440, 900, 0.625],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment