Sha256: d6fb9b354fd32c3d33f4fb0578ac74977d824604e999fd104b82ab5a10427bdf
Contents?: true
Size: 758 Bytes
Versions: 1
Compression:
Stored size: 758 Bytes
Contents
require 'spec_helper' describe "DotGrid::Pattern::DotGrid" 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::DotGrid.new(params) } before do allow(pdf).to receive(:fill_color) allow(pdf).to receive(:fill_circle) end it "sets the fill color" do expect(pdf).to receive(:fill_color) subject.draw end it "calls fill circle the correct number of times" do allow(subject).to receive(:rows).and_return(2) allow(subject).to receive(:columns).and_return(3) expect(pdf).to receive(:fill_circle).exactly(3*4).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/dot_grid_spec.rb |