21/09/2008

Turns out I was doing my unit testing all wrong!

I thought - based upon a couple of examples that I had read - that SUnit worked like this:

self should: [some condition].
self shouldnt: [some condition].


Turns out that the should and shouldnt messages are for checking whether errors have been raised or not. I need to learn a bit more about them. However, I now know that the right messages to send are assert: and deny:

You can read a bit more about using SUint, in a practical way, here

No comments: