Sha256: b934ba3078e46bfb641bb8aa963911ffa9508b8e891a7e06ec1ed626bfd14d94

Contents?: true

Size: 656 Bytes

Versions: 1

Compression:

Stored size: 656 Bytes

Contents

require 'spec_helper'
require 'straightedge/extend/array'
require 'straightedge/rose'
require 'straightedge/ruler'

  # TODO separate into own spec?
describe Straightedge::Rose do
  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/rose_spec.rb