Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (17 sloc) 0.712 kb
require './test/helper'
class GeometryDetectorTest < Test::Unit::TestCase
should 'identify an image and extract its dimensions' do
Paperclip::GeometryParser.stubs(:new).with("434x66,").returns(stub(:make => :correct))
file = fixture_file("5k.png")
factory = Paperclip::GeometryDetector.new(file)
output = factory.make
assert_equal :correct, output
end
should 'identify an image and extract its dimensions and orientation' do
Paperclip::GeometryParser.stubs(:new).with("300x200,6").returns(stub(:make => :correct))
file = fixture_file("rotated.jpg")
factory = Paperclip::GeometryDetector.new(file)
output = factory.make
assert_equal :correct, output
end
end
Jump to Line
Something went wrong with that request. Please try again.