Sha256: 9ecc9c8f0f805f090ce645ac0927b745f0cd68ad130a5af94850e556c398bb25

Contents?: true

Size: 747 Bytes

Versions: 4

Compression:

Stored size: 747 Bytes

Contents

require 'minitest/autorun'
require 'geometry/obround'

describe Geometry::Obround do
    Obround = Geometry::Obround

    describe "when constructed" do
	it "must accept two Points" do
	    obround = Geometry::Obround.new [1,2], [3,4]
	    obround.must_be_kind_of Geometry::Obround
	end

	it "must accept a width and height" do
	    obround = Geometry::Obround.new 2, 3
	    obround.must_be_kind_of Geometry::Obround
	    obround.height.must_equal 3
	    obround.width.must_equal 2
	end

	it "must compare equal" do
	    obround = Geometry::Obround.new [1,2], [3,4]
	    obround.must_equal Obround.new([1,2], [3,4])
	end
    end

    it 'must always be closed' do
	obround = Geometry::Obround.new 2, 3
	obround.closed?.must_equal true
    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
geometry-6.6 test/geometry/obround.rb
geometry-6.5 test/geometry/obround.rb
geometry-6.4 test/geometry/obround.rb
geometry-6.3 test/geometry/obround.rb