spec/morandi_spec.rb in morandi-0.9.3 vs spec/morandi_spec.rb in morandi-0.10.0

- old
+ new

@@ -16,9 +16,16 @@ _,w,h = Gdk::Pixbuf.get_file_info(out) expect(original[1]).to eq(h) expect(original[2]).to eq(w) end + it "should accept pixbufs as an argument" do + pixbuf = Gdk::Pixbuf.new("sample/sample.jpg") + pro = Morandi::ImageProcessor.new(pixbuf, {}, {}) + pro.process! + expect(pixbuf.width).to eq(pro.result.width) + end + it "should do cropping of images" do Morandi.process("sample/sample.jpg", { 'crop' => [10,10,300,300] }, out="sample/out_crop.jpg") expect(File.exist?(out))