Browse Source

Fix unit test breakage

dev
Andy Meneely 11 years ago
parent
commit
b03dbb54da
  1. 6
      spec/api/api_text_spec.rb

6
spec/api/api_text_spec.rb

@ -6,7 +6,7 @@ describe Squib::Deck, '#text' do
context 'fonts' do context 'fonts' do
it "should use the default font when #text and #set_font don't specify" do it "should use the default font when #text and #set_font don't specify" do
card = instance_double(Squib::Card) card = instance_double(Squib::Card)
expect(card).to receive(:text).with(anything, 'a', 'Arial 36', *([anything] * 15)).once expect(card).to receive(:text).with(anything, 'a', 'Arial 36', *([anything] * 17)).once
Squib::Deck.new do Squib::Deck.new do
@cards = [card] @cards = [card]
text str: 'a' text str: 'a'
@ -15,7 +15,7 @@ describe Squib::Deck, '#text' do
it "should use the #set_font when #text doesn't specify" do it "should use the #set_font when #text doesn't specify" do
card = instance_double(Squib::Card) card = instance_double(Squib::Card)
expect(card).to receive(:text).with(anything, 'a', 'Times New Roman 16', *([anything] * 15)).once expect(card).to receive(:text).with(anything, 'a', 'Times New Roman 16', *([anything] * 17)).once
Squib::Deck.new do Squib::Deck.new do
@cards = [card] @cards = [card]
set font: 'Times New Roman 16' set font: 'Times New Roman 16'
@ -25,7 +25,7 @@ describe Squib::Deck, '#text' do
it 'should use the specified font no matter what' do it 'should use the specified font no matter what' do
card = instance_double(Squib::Card) card = instance_double(Squib::Card)
expect(card).to receive(:text).with(anything, 'a', 'Arial 18', *([anything] * 15)).once expect(card).to receive(:text).with(anything, 'a', 'Arial 18', *([anything] * 17)).once
Squib::Deck.new do Squib::Deck.new do
@cards = [card] @cards = [card]
set font: 'Times New Roman 16' set font: 'Times New Roman 16'

Loading…
Cancel
Save