Shamelessly poach the last few coverage lines.
parent
a57c2a7dad
commit
cec44f1c57
|
|
@ -60,6 +60,12 @@ describe Squib::Args::Draw do
|
||||||
expect(draw).to have_attributes( cap: [Cairo::LINE_CAP_SQUARE] )
|
expect(draw).to have_attributes( cap: [Cairo::LINE_CAP_SQUARE] )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'converts line join' do
|
||||||
|
args = {join: 'round'}
|
||||||
|
draw.load! args
|
||||||
|
expect(draw).to have_attributes( join: [Cairo::LINE_JOIN_ROUND] )
|
||||||
|
end
|
||||||
|
|
||||||
it 'allows fill_first stroke_strategy' do
|
it 'allows fill_first stroke_strategy' do
|
||||||
args = {stroke_strategy: :FILL_first}
|
args = {stroke_strategy: :FILL_first}
|
||||||
draw.load! args
|
draw.load! args
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
require 'squib/card'
|
||||||
|
|
||||||
|
describe Squib::Card do
|
||||||
|
it 'logs fatal for unknown backend' do
|
||||||
|
deck = OpenStruct.new(dir: '.', prefix: '', count_format: '%02d', backend: 'broken robots')
|
||||||
|
|
||||||
|
expect(Squib::logger).to receive(:fatal).with("Back end not recognized: 'broken robots'")
|
||||||
|
expect { Squib::Card.new(deck, 100, 100, 0) }.to raise_error SystemExit
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -31,4 +31,9 @@ describe Squib::Conf do
|
||||||
Squib::Conf.load conf('unrecognized.yml')
|
Squib::Conf.load conf('unrecognized.yml')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'helps Andy get full coverage with a test on to_s' do
|
||||||
|
conf = Squib::Conf.load conf('empty.yml')
|
||||||
|
expect(conf.to_s).to start_with 'Conf: '
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue