Browse Source

Shamelessly poach the last few coverage lines.

dev
Andy Meneely 10 years ago
parent
commit
cec44f1c57
  1. 6
      spec/args/draw_spec.rb
  2. 11
      spec/card_spec.rb
  3. 5
      spec/conf_spec.rb

6
spec/args/draw_spec.rb

@ -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

11
spec/card_spec.rb

@ -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

5
spec/conf_spec.rb

@ -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…
Cancel
Save