benjohn
3/25/2006 1:58:00 PM
On 25 Mar 2006, at 10:57, Alex Combas wrote:
> def test_tracker
> assert_equal @t.track(@maze,27),28,"doesnt track"
> assert_equal @t.track(@maze,28),29,"doesnt track"
> end
This is no use to you at all, but thank you for:
* Reminding me that Ruby doesn't need parenthesise; I like the
'assert_euqal's without them a lot.
* Showing me that 'assert_equal' (and the others, I'm sure) will
accept a third descriptive argument - I didn't know that, and I can
see it's useful!
I've just started trying to use TDD, and so far I am very impressed.
What I like about it is how much it makes me think about what I'm
doing, rather than how I'm going to do it. I can see that it is a
discipline that is going to need a lot of practice though; it's
already given me benefits, but I do find it hard at the moment.
Interestingly, there are a few things I've been trying to build
without TDD for a while. I've sat down and tried to do them with TDD,
and it has been very helpful, in that I've got no where :) Basically,
I've realised that I don't _really_ know what I'm trying to do; and I
need to know that before I can work out how to do it.
I think I also need to learn to be a bit less strict, and just get on
with it. Write a test for something that seems about right, and be
prepared to chuck it all out if I find I'm barking up the wrong tree,
or I've not quite got the right slant on what I'm trying to do.
Cheers,
Benjohn