@@ -0,0 +1,7 @@
|
||||
sheet_width: 8.5in
|
||||
sheet_height: 11in
|
||||
card_width: 2.5in
|
||||
card_height: 3.5in
|
||||
cards:
|
||||
- x: -0.5in
|
||||
y: -1in
|
||||
@@ -158,6 +158,13 @@ describe Squib::Sprue do
|
||||
expect(tmpl.cards.map { |card| card['flip_horizontal'] })
|
||||
.to eq( [false, false, true] )
|
||||
end
|
||||
|
||||
it 'parses negative coordinates' do
|
||||
tmpl = Squib::Sprue.load(sprue_file('negatives.yml'), 100, 37.5)
|
||||
expect(tmpl.cards.length).to eq(1)
|
||||
expect(tmpl.cards.map { |card| card['x'] }) .to eq( [-50] )
|
||||
expect(tmpl.cards.map { |card| card['y'] }) .to eq( [-100] )
|
||||
end
|
||||
|
||||
it 'fails when sheet_width is not defined' do
|
||||
expect do
|
||||
|
||||
Reference in New Issue
Block a user