Sha256: 66d52018c4113a0073ed903caa7dfe98229ab762be090434525c8e9035d38a79
Contents?: true
Size: 749 Bytes
Versions: 1
Compression:
Stored size: 749 Bytes
Contents
require 'spec_helper' describe "DotGrid::Pattern::HorizontalRule" do describe "#draw" do let(:pdf) { double('pdf') } let(:params) { { pdf: pdf, bounds: double('bounds', { height: 20.mm, width: 10.mm } ), spacing: 5 } } let(:subject) { DotGrid::Pattern::HorizontalRule.new(params) } before do allow(pdf).to receive(:stroke_color) allow(pdf).to receive(:stroke_horizontal_line) end it "sets the fill color" do expect(pdf).to receive(:stroke_color) subject.draw end it "calls horizontal line the correct number of times" do allow(subject).to receive(:rows).and_return(2) expect(pdf).to receive(:stroke_horizontal_line).exactly(2 + 1).times subject.draw end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dot_grid-0.0.4 | spec/lib/dot_grid/pattern/horizontal_rule_spec.rb |