Permalink
Browse files

Tweaks to geometry changes.

  • Loading branch information...
1 parent 7792407 commit 0a1187e3e3823a1c6657544f569292405629aaad @jyurek jyurek committed Nov 14, 2008
Showing with 7 additions and 5 deletions.
  1. +7 −5 test/geometry_test.rb
View
12 test/geometry_test.rb
@@ -49,17 +49,19 @@ class GeometryTest < Test::Unit::TestCase
assert_nil @geo.modifier
end
- ['>', '<', '#', '@', '%', '^', '!'].each do |mod|
- should "ensure the modifier #{mod} is preserved" do
+ ['>', '<', '#', '@', '%', '^', '!', nil].each do |mod|
+ should "ensure the modifier #{mod.inspect} is preserved" do
assert @geo = Paperclip::Geometry.parse("123x456#{mod}")
assert_equal mod, @geo.modifier
+ assert_equal "123x456#{mod}", @geo.to_s
end
end
- ['>', '<', '#', '@', '%', '^', '!'].each do |mod|
- should "ensure the modifier #{mod} gets passed to ImageMagic" do
+ ['>', '<', '#', '@', '%', '^', '!', nil].each do |mod|
+ should "ensure the modifier #{mod.inspect} is preserved with no height" do
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

0 comments on commit 0a1187e

Please sign in to comment.