OCMock is a new framework for testing Objective-C code using mock objects. Its trampoline-based interface is extremely simple:

Expectations

A trampoline records the message to expect, and the mock later checks to see whether your test code caused the same message to be sent to it. (It doesn’t seem to check the order or number of the messages, and unfortunately messages with non-object arguments don’t seem to be supported.)

Stubs

Using two trampolines, you can add a stub method to your mock object and set its return value.

From the user’s perspective, OCMock is not really any better than EasyMock (for Java), and it has considerably fewer features. However, it does fill a need in Objective-C, and it is a good example of what you can do in that language with relatively few lines of code.

Certainly schools should teach students how to write. But due to a series of historical accidents the teaching of writing has gotten mixed together with the study of literature. And so all over the country students are writing not about how a baseball team with a small budget might compete with the Yankees, or the role of color in fashion, or what constitutes a good dessert, but about symbolism in Dickens.