New spec for validating line caps
Because I'm obsessed with code coverage.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user