Luke Melia

software dev

February 28, 2007

Loosely-coupled Mocks

Aaron at the Eleutian Dev Blog has an excellent post on Loosely-coupled Mocks.

That said, I do have a few ground rules for when I write tests with Rhino Mocks that sort fall into the whole one assertion per test topic and the mocks vs. stubs thing. Here they are…

The tips he covers are definitely ones that my team has learned or is in the process of (sometimes painfully) learning. It’s very easy for tests with mocks to be difficult to understand and also to yield false failures. If your tests are brittle or intimidating to work with, you’re contrary to the goal of a test suite enabling change and refactoring.

Great to see more people blogging about Rhino Mocks!

Leave a Reply

LukeMelia.com created 1999. ··· Luke Melia created 1976. ··· Live With Passion!