You'll need to use wp
instead of @wp
and bp
instead of @bp
, because those are methods, not instance variables:
describe 'least number of moves from x to y' do
let!(:wp){'white-pawn'}
let!(:bp){'black-pawn'}
it 'has a populated chessboard' do
expect(ChessBoard.new.populate_new_board).to eq [
['white-castle','white-knight','white-bishop','white-queen','white-king','white-bishop','white-knight','white-castle'],
[wp,wp,wp,wp,wp,wp,wp,wp],
[nil,nil,nil,nil,nil,nil,nil,nil],
[nil,nil,nil,nil,nil,nil,nil,nil],
[nil,nil,nil,nil,nil,nil,nil,nil],
[nil,nil,nil,nil,nil,nil,nil,nil],
[bp,bp,bp,bp,bp,bp,bp,bp],
['black-castle','black-knight','black-bishop','black-king','black-queen','black-bishop','black-knight','black-castle']]
end
end