In what way is this not working for you?

My guess is likely that you haven't defined `subject`?

context do subject { Game.new } # ... end

Xavier

On Tue, May 26, 2015, at 11:24 PM, Alexander Karsten wrote:
> 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[1].
>
For more options, visit https://groups.google.com/d/optout.



Links:

  1. 
https://groups.google.com/d/msgid/rspec/f6a546a5-5d03-42e6-a4c7-190144368487%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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/1432651042.3099357.278381921.24DD2CD5%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to