Commit 0a1187e3 by Jon Yurek

Tweaks to geometry changes.

parent 7792407e
...@@ -49,17 +49,19 @@ class GeometryTest < Test::Unit::TestCase ...@@ -49,17 +49,19 @@ class GeometryTest < Test::Unit::TestCase
assert_nil @geo.modifier assert_nil @geo.modifier
end end
['>', '<', '#', '@', '%', '^', '!'].each do |mod| ['>', '<', '#', '@', '%', '^', '!', nil].each do |mod|
should "ensure the modifier #{mod} is preserved" do should "ensure the modifier #{mod.inspect} is preserved" do
assert @geo = Paperclip::Geometry.parse("123x456#{mod}") assert @geo = Paperclip::Geometry.parse("123x456#{mod}")
assert_equal mod, @geo.modifier assert_equal mod, @geo.modifier
assert_equal "123x456#{mod}", @geo.to_s
end end
end end
['>', '<', '#', '@', '%', '^', '!'].each do |mod| ['>', '<', '#', '@', '%', '^', '!', nil].each do |mod|
should "ensure the modifier #{mod} gets passed to ImageMagic" do should "ensure the modifier #{mod.inspect} is preserved with no height" do
assert @geo = Paperclip::Geometry.parse("123x#{mod}") assert @geo = Paperclip::Geometry.parse("123x#{mod}")
assert_equal mod, @geo.to_s.last assert_equal mod, @geo.modifier
assert_equal "123#{mod}", @geo.to_s
end end
end end
......
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