Sha256: e97c49fca732a9c61548c1ef9194f4646665d40a470713969cc9cf200bc7b5d8
Contents?: true
Size: 1.35 KB
Versions: 2
Compression:
Stored size: 1.35 KB
Contents
require 'spec_helper' require 'squib' describe Squib::Deck, 'images' do context '#png' do it 'calls Card#png, Dir, and progress bar' do card = instance_double(Squib::Card) progress = double(Squib::Progress) expect(card).to receive(:png).with('foo', 0, 1, :native, :native, 0.5, :overlay, 0.75).once expect(Dir).to receive(:chdir).with('.').and_yield.once expect(progress).to receive(:start).and_yield(progress).once expect(progress).to receive(:increment).once Squib::Deck.new do @progress_bar = progress @cards = [card] png file: 'foo', x: 0, y: 1, alpha: 0.5, blend: :overlay, angle: 0.75 end end end context '#svg' do it 'calls Card#svg, Dir, and progress bar' do card = instance_double(Squib::Card) progress = double(Squib::Progress) expect(card).to receive(:svg).with('foo', '#bar', 0, 1, 20, 30, 0.5, :overlay, 0.75).once expect(Dir).to receive(:chdir).with('.').and_yield.once expect(progress).to receive(:start).and_yield(progress).once expect(progress).to receive(:increment).once Squib::Deck.new do @progress_bar = progress @cards = [card] svg file: 'foo', id: 'bar', x: 0, y: 1, width: 20, height: 30, alpha: 0.5, blend: :overlay, angle: 0.75 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
squib-0.2.0 | spec/api/api_image_spec.rb |
squib-0.1.0 | spec/api/api_image_spec.rb |