New spec for validating line caps

Because I'm obsessed with code coverage.
This commit is contained in:
Andy Meneely
2015-07-10 13:03:22 -04:00
parent c66c6bc4f0
commit 37a7210751
+7 -1
View File
@@ -22,7 +22,7 @@ describe Squib::Args::Draw do
draw.load!(args)
expect(draw).to have_attributes(
join: [Cairo::LINE_JOIN_BEVEL],
cap: [Cairo::LINE_CAP_ROUND]
cap: [Cairo::LINE_JOIN_ROUND]
)
end
@@ -44,6 +44,12 @@ describe Squib::Args::Draw do
expect(draw).to have_attributes(dash: [[900, 1200, 1500]])
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
it 'looks up custom colors in the config' do