New spec for validating line caps

Because I'm obsessed with code coverage.
dev
Andy Meneely 2015-07-10 13:03:03 -04:00
parent c66c6bc4f0
commit 37a7210751
1 changed files with 7 additions and 1 deletions

View File

@ -22,7 +22,7 @@ describe Squib::Args::Draw do
draw.load!(args) draw.load!(args)
expect(draw).to have_attributes( expect(draw).to have_attributes(
join: [Cairo::LINE_JOIN_BEVEL], join: [Cairo::LINE_JOIN_BEVEL],
cap: [Cairo::LINE_CAP_ROUND] cap: [Cairo::LINE_JOIN_ROUND]
) )
end end
@ -44,6 +44,12 @@ describe Squib::Args::Draw do
expect(draw).to have_attributes(dash: [[900, 1200, 1500]]) expect(draw).to have_attributes(dash: [[900, 1200, 1500]])
end end
it 'converts line caps to Cairo constants' do
args = {cap: :SQUARE}
draw.load! args
expect(draw).to have_attributes( cap: [Cairo::LINE_CAP_SQUARE] )
end
context 'custom colors' do context 'custom colors' do
it 'looks up custom colors in the config' do it 'looks up custom colors in the config' do