spec/spec_helper.rb in squib-0.0.6 vs spec/spec_helper.rb in squib-0.1.0
- old
+ new
@@ -52,12 +52,14 @@
# and logs that call to the string buffer
def mock_cairo(strio)
cxt = double(Cairo::Context)
surface = double(Cairo::ImageSurface)
pango = double(Pango::Layout)
+ allow(Squib.logger).to receive(:warn) {}
allow(ProgressBar).to receive(:create).and_return(Squib::DoNothing.new)
allow(Cairo::ImageSurface).to receive(:new).and_return(surface)
allow(surface).to receive(:width).and_return(100)
+ allow(surface).to receive(:height).and_return(101)
allow(Cairo::Context).to receive(:new).and_return(cxt)
allow(cxt).to receive(:create_pango_layout).and_return(pango)
allow(cxt).to receive(:target).and_return(surface)
allow(pango).to receive(:height).and_return(25)
allow(pango).to receive(:width).and_return(25)