Hello,
I am trying to learn RSpec by building a connect four game. I have a board class, that stores the game board as an array and I'm trying to validate the dimensions of the array.
However I feel like im going horribly wrong here and hours of googling were to no help.
How do I do this right?
context "board array" do
specify { expect(subject.board).to be_a Array }
specify { expect(subject.board.length).to eq 6 }
specify { expect(subject.board.all? { |row| row.length == 7 }).to be_truthy }
end
Thank you very much for your time.