Sha256: 104bf2182b8a496853b475b50d4545b8255e4c3a57c5c6a7cce477dbbd02b3e2
Contents?: true
Size: 1.36 KB
Versions: 1
Compression:
Stored size: 1.36 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, nil).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', nil, '#bar', 0, 1, 20, 30, 0.5, :overlay, 0.75, nil).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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
squib-0.6.0 | spec/api/api_image_spec.rb |