After eating our own dog food for a while, we think we might have some valuable tips for people who want to try ActiveRecord.
Test cases
Have test cases for your object model
So when you change something on your model, you can easily check if something breaks.
Test interactions
The interactions among objects are especially important. When they are meaningfull, create special methods for them that assert some conditions.
For example, with a Pool and Vote classes, the Pool might expose a RegisterVote method.
Code a little, test a little
Prefer small steps instead of creating a whole object model assuming that it's right and working. Growing the object model in small steps, while coding test cases for it, allows you to quickly identify something that went wrong.
Testing a complex object model
As the application grows big, you might end up with a complex object model with lots of interconnections. So testing become a complex issue, for example, imagine that you want to test an Order class, but to test it you must create a Product, and a Supplier and an Consumer.
We recommend using ObjectMother
pattern for such cases.
