Singleton expansion has... expanded!

Closes #13, hopefully
This commit is contained in:
Andy Meneely
2014-08-11 00:22:04 -04:00
parent 91bcfb06e2
commit 3e08a0d604
12 changed files with 222 additions and 126 deletions
+11 -5
View File
@@ -3,10 +3,12 @@ require 'squib'
describe Squib::Deck, '#text' do
context "when working with fonts" do
it"should use the default font when #text and #set_font don't specify" do
context "fonts" do
it "should use the default font when #text and #set_font don't specify" do
card = instance_double(Squib::Card)
expect(card).to receive(:text).with('a', 'Arial 36', anything, anything, anything, anything).once
expect(card).to receive(:text).with('a', 'Arial 36',
anything, anything, anything, anything,anything, anything, anything, anything,anything, anything, anything, anything, anything
).once
Squib::Deck.new do
@cards = [card]
text str: 'a'
@@ -15,7 +17,9 @@ describe Squib::Deck, '#text' do
it "should use the #set_font when #text doesn't specify" do
card = instance_double(Squib::Card)
expect(card).to receive(:text).with('a', 'Times New Roman 16', anything, anything, anything, anything).once
expect(card).to receive(:text).with('a', 'Times New Roman 16',
anything, anything, anything, anything,anything, anything, anything, anything,anything, anything, anything, anything, anything
).once
Squib::Deck.new do
@cards = [card]
set font: 'Times New Roman 16'
@@ -25,7 +29,9 @@ describe Squib::Deck, '#text' do
it "should use the specified font no matter what" do
card = instance_double(Squib::Card)
expect(card).to receive(:text).with('a', 'Arial 18', anything, anything, anything, anything).once
expect(card).to receive(:text).with('a', 'Arial 18',
anything, anything, anything, anything,anything, anything, anything, anything,anything, anything, anything, anything, anything
).once
Squib::Deck.new do
@cards = [card]
set font: 'Times New Roman 16'