Convert save_sheet and save_pdf to args classes
This commit is contained in:
@@ -26,8 +26,9 @@ describe Squib::Deck, '#save_pdf' do
|
||||
it 'make all the expected calls on a smoke test' do
|
||||
num_cards = 9
|
||||
deck = Squib::Deck.new(cards: 9, width: 825, height: 1125)
|
||||
expect(deck).to receive(:dirify) { |arg| arg } #don't create the dir
|
||||
expect(Squib.logger).to receive(:debug).at_least(:once)
|
||||
expect(Squib.logger).to receive(:warn).exactly(:once) #warn about making the dir
|
||||
expect(Dir).to receive(:mkdir) {} # don't actually make the dir
|
||||
expect(cxt).to receive(:scale).with(0.24, 0.24)
|
||||
|
||||
expect_card_place(75, 75)
|
||||
@@ -50,7 +51,8 @@ describe Squib::Deck, '#save_pdf' do
|
||||
args = { range: 2..4, file: 'foo.pdf', dir: '_out', margin: 75, gap: 5, trim: 37 }
|
||||
deck = Squib::Deck.new(cards: num_cards, width: 825, height: 1125)
|
||||
expect(Squib.logger).to receive(:debug).at_least(:once)
|
||||
expect(deck).to receive(:dirify) { |arg| arg } #don't create the dir
|
||||
expect(Squib.logger).to receive(:warn).exactly(:once) #warn about making the dir
|
||||
expect(Dir).to receive(:mkdir) {} # don't actually make the dir
|
||||
expect(cxt).to receive(:scale).with(0.24, 0.24)
|
||||
|
||||
expect_card_place(75, 75)
|
||||
|
||||
Reference in New Issue
Block a user