* Flipping works, now just need new argument * Finishing up * New test data
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
sheet_width: 8.5in
|
||||
sheet_height: 11in
|
||||
card_width: 2.5in
|
||||
card_height: 3.5in
|
||||
cards:
|
||||
- x: 0.5in
|
||||
y: 1in
|
||||
- x: 3.0in
|
||||
y: 1in
|
||||
flip_vertical: true
|
||||
- x: 3.5in
|
||||
y: 1in
|
||||
flip_horizontal: true
|
||||
@@ -144,6 +144,15 @@ describe Squib::Sprue do
|
||||
)
|
||||
end
|
||||
|
||||
it 'loads a template with flipped cards' do
|
||||
tmpl = Squib::Sprue.load(sprue_file('card_flip.yml'), 100)
|
||||
expect(tmpl.cards.length).to eq(3)
|
||||
expect(tmpl.cards.map { |card| card['flip_vertical'] })
|
||||
.to eq( [false, true, false] )
|
||||
expect(tmpl.cards.map { |card| card['flip_horizontal'] })
|
||||
.to eq( [false, false, true] )
|
||||
end
|
||||
|
||||
it 'fails when sheet_width is not defined' do
|
||||
expect do
|
||||
Squib::Sprue.load(sprue_file('fail_no_sheet_width.yml'), 100)
|
||||
|
||||
Reference in New Issue
Block a user