spec/gnawrnip/image_spec.rb in gnawrnip-0.3.0 vs spec/gnawrnip/image_spec.rb in gnawrnip-0.3.1

- old
+ new

@@ -11,17 +11,13 @@ Image.new(GnawrnipTest.image('gnawrnip/image')) end context 'image size is 640x480' do let(:canvas) do - double(dimension: dimension, save: nil) + double(width: 640, height: 480, save: nil) end - let(:dimension) do - double(width: 640, height: 480) - end - describe '.width' do subject { image.width } it { should eql 640 } end @@ -31,15 +27,11 @@ end describe '.resize' do let(:canvas) do canvas = super() - expect(canvas).to receive(:resample_bilinear).with(320, 240).and_return(canvas) + expect(canvas).to receive(:resample_bilinear!).with(320, 240).once canvas - end - - before do - expect_any_instance_of(Image).to receive(:analysis).twice end it { image.resize(320, 240) } end end