spec/graphics/graphics_images_spec.rb in squib-0.2.0 vs spec/graphics/graphics_images_spec.rb in squib-0.3.0
- old
+ new
@@ -24,21 +24,20 @@
expect(@context).to receive(:paint).with(0.9).once
expect(@context).to receive(:restore).once
card = Squib::Card.new(@deck, 100, 150)
# png(file, x, y, alpha, blend, angle)
- card.png('foo.png', 37, 38, :native, :native, 0.9, :none, 0.0)
+ card.png('foo.png', 37, 38, :native, :native, 0.9, :none, 0.0, nil)
end
it 'sets blend when needed' do
@context.as_null_object
expect(@context).to receive(:operator=).with(:overlay).once
card = Squib::Card.new(@deck, 100, 150)
- card.png('foo.png', 37, 38, :native, :native, 0.9, :overlay, 0.0)
+ card.png('foo.png', 37, 38, :native, :native, 0.9, :overlay, 0.0, nil)
end
-
end
context '#svg' do
it 'makes all the expected calls on a smoke test' do
expect(@svg).to receive(:width).and_return(100).twice
@@ -53,29 +52,29 @@
expect(@context).to receive(:paint).with(0.9).once
expect(@context).to receive(:restore).once
card = Squib::Card.new(@deck, 100, 150)
# svg(file, id, x, y, width, height, alpha, blend, angle)
- card.svg('foo.png', 'id', 37, 38, :native, :native, 0.9, :none, 0.0)
+ card.svg('foo.png', 'id', 37, 38, :native, :native, 0.9, :none, 0.0, nil)
end
it 'sets blend when needed' do
@context.as_null_object
@svg.as_null_object
expect(@context).to receive(:operator=).with(:overlay).once
card = Squib::Card.new(@deck, 100, 150)
- card.svg('foo.png', nil, 37, 38, :native, :native, 0.9, :overlay, 0.0)
+ card.svg('foo.png', nil, 37, 38, :native, :native, 0.9, :overlay, 0.0, nil)
end
it 'sets width & height when needed' do
@context.as_null_object
expect(@svg).to receive(:width).and_return(100).once
expect(@svg).to receive(:height).and_return(100).once
expect(@context).to receive(:scale).with(2.0, 3.0).once
card = Squib::Card.new(@deck, 100, 150)
- card.svg('foo.png', nil, 37, 38, 200, 300, 0.9, :none, 0.0)
+ card.svg('foo.png', nil, 37, 38, 200, 300, 0.9, :none, 0.0, nil)
end
end
end