Sha256: bd5094a3f38773da2c4e078ad6d4e22cb1086d0cf6d4eab0f56b37cd93721355
Contents?: true
Size: 648 Bytes
Versions: 6
Compression:
Stored size: 648 Bytes
Contents
require 'spec_helper' describe Spyglass::Contour do let(:empty_contour) { Spyglass::Contour.new } let(:contour) do points = 10.times.map { |i| Spyglass::Point.new(i + 1, i + 1) } Spyglass::Contour.new points end describe '.new' do it 'should work without arguments' do expect( empty_contour ).to be_a Spyglass::Contour end it 'should work with an array of points' do expect { contour }.not_to raise_error end end describe '#rect' do it 'should return the bounding rect' do expect( contour.rect.size.width ).to eq(10) expect( contour.rect.size.height ).to eq(10) end end end
Version data entries
6 entries across 6 versions & 1 rubygems