# encoding: UTF-8 require 'test_helper' class ImageSizeTest < MiniTest::Spec context "Image size parser" do setup do @base_dir = File.expand_path(File.join(File.dirname(__FILE__), '../fixtures/images')) @dimensions = [50, 67] end should "work for PNG24" do ImageSize.read(File.join(@base_dir, "size.png24")).should == @dimensions end should "work for PNG8" do ImageSize.read(File.join(@base_dir, "size.png8")).should == @dimensions end should "work for JPG" do ImageSize.read(File.join(@base_dir, "size.jpg")).should == @dimensions end should "work for GIF" do ImageSize.read(File.join(@base_dir, "size.gif")).should == @dimensions end end end