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.
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/f6a546a5-5d03-42e6-a4c7-190144368487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.