Feb 17
New rSpec on the way
Dave Chelimsky and I spent an evening this week ripping out the expectation logic of rSpec and rebuilding it based on his ShouldHelper ideas. The result is sweeeeet!
For example:
def place_south_facing_obelisk
@board.place 'G O A5 S'
piece = @board.at 'A5'
piece.obelisk?.should_be_true
piece.facing?('S').should_be_true
end
is now:
def place_south_facing_obelisk
@board.place 'G O A5 S'
piece = @board.at 'A5'
piece.should.be.obelisk
piece.should.be.facing 'S'
end
Now if we could just get rid of those damn periods. Oh.. wait.. why don’t we just use Smalltalk and be done with it.
Comments Off
