Sha256: 0169140d25c635e803b779b5df9f683c67516667fc132e630bc11577b2368619

Contents?: true

Size: 691 Bytes

Versions: 2

Compression:

Stored size: 691 Bytes

Contents

require 'spec_helper'
describe Box do 
  let(:box) { Box.new([1,2,4,5,6,7,8,9], 0, 5)}
  context "Coordinates" do 
    it "is correct" do 
      expect(box.blank_spaces).to eql([1, 0, 5])
      @let_box = Box.new([], 8, 8)
      expect(@let_box.blank_spaces).to eql([8, 8, 8])
    end
  end
  context "#differance" do
    it "shows the incorrect differance" do
      expect(box.difference).to_not eql(Array(5..9))
    end
    it "show the correct differance" do 
      expect(box.difference).to eql([3])
    end
  end 
  context "#complete" do 
    it "completes the cell" do 
      @in_box = Box.new([1,0,3,4,5,6,7,8,9])
      expect(@in_box.complete).to eql(Array(1..9))
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sudoku-jedi-1.0.0 spec/box_spec.rb
sudoku-jedi-0.0.4 spec/box_spec.rb