Skip to content

Commit

Permalink
Merge pull request #41 from rywall/master
Browse files Browse the repository at this point in the history
Can't change the format of an image with a capitalized JPG extension
  • Loading branch information
HamptonMakes committed Jun 2, 2011
2 parents 1d8401a + 4c68f16 commit fec940a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/image_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ImageTest < Test::Unit::TestCase
NOT_AN_IMAGE_PATH = CURRENT_DIR + "not_an_image.php"
GIF_WITH_JPG_EXT = CURRENT_DIR + "actually_a_gif.jpg"
EXIF_IMAGE_PATH = CURRENT_DIR + "trogdor.jpg"
CAP_EXT_PATH = CURRENT_DIR + "trogdor_capitalized.JPG"
ANIMATION_PATH = CURRENT_DIR + "animation.gif"

def test_image_from_blob
Expand Down Expand Up @@ -62,6 +63,11 @@ def test_remote_image_with_complex_url
assert image.valid?
image.destroy!
end

def test_reformat_with_capitalized_extension
image = Image.open(CAP_EXT_PATH)
image.format "jpg"
end

def test_image_write
output_path = "output.gif"
Expand Down
Binary file added test/trogdor_capitalized.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fec940a

Please sign in to comment.