Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #839 from bhicks/additional-scale-images-tests

Add additional scale image tests
commit cebf0c932e1ff8db1a5a72220b2616d9217e918c 2 parents af1f659 + f9eb053
@practicingruby practicingruby authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 spec/images_spec.rb
View
16 spec/images_spec.rb
@@ -149,5 +149,21 @@
end
end
+ describe ":width option without :height option" do
+ it "scales the width and height" do
+ info = @pdf.image @filename, :width => 225
+ info.scaled_height.should == 168.75
+ info.scaled_width.should == 225.0
+ end
+ end
+
+ describe ":height option without :width option" do
+ it "scales the width and height" do
+ info = @pdf.image @filename, :height => 225
+ info.scaled_height.should == 225.0
+ info.scaled_width.should == 300.0
+ end
+ end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.