Sha256: 22e98f725bfb01dc0c6eff928ba936dffdcc428578cc56b2a5c827642e8f9e5a

Contents?: true

Size: 723 Bytes

Versions: 1

Compression:

Stored size: 723 Bytes

Contents

require 'spec_helper'
require 'straightedge/extend/array'
require 'straightedge/mark'
require 'straightedge/rose'
require 'straightedge/compass'

describe Compass do
  let(:origin) { [0,0] }

  context "roses" do
    it 'should construct a simple rose' do
      %i[ north south east west ].each do |d| 
	expect(Rose.simple.directions.keys).to include(d) 
      end
    end

    it 'should construct an extended rose' do
      expect(Rose.extended.directions).to eql({
        :east  => [1, 0],
        :north => [0, -1],
        :northeast => [1, -1],
        :northwest => [-1, -1],
        :south => [0, 1],
        :southeast => [1, 1],
        :southwest => [-1, 1],
        :west => [-1, 0]
      })
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
straightedge-0.1.0 spec/straightedge/compass_spec.rb