Reputation: 3390
So I've got a method in a game class...
def drawgrid
@board.draw
end
I want to write a test that verifies that drawgrid calls @board.draw
My current test looks like this....
describe 'drawgrid method' do
it 'should call @board.drawgrid' do
@game.drawgrid.should be_true
@game.drawgrid
end
end
Is this the best/ideal way to write this? Is there a better way?
Am I doing this right?
This seems nebulous to me.
Upvotes: 0
Views: 149