All Posts For: Testing

Mar 12 2014

Making a Mockery with Mock Objects

Mock objects are used by many developers when they’re using test-driven development to design their systems, but what is it? And what are all these subtypes like partial mocks and nice mocks? Are mock objects usually nasty but impartial? Let’s take a look, using examples from the OCMock framework for Objective-C testing.

May 24 2012

Testing Like a Highgroover

Last month on the 37signals blog, DHH wrote about testing like the tsa. In the article David argues for less strict test driven development and quotes Kent Beck in saying:

I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence (I suspect this level of confidence is high compared to industry standards, but that could just be hubris).…

Apr 6 2012

Sane Rspec config for clean, and slightly faster, specs

Database-bound tests are a drag. Inconsistent tests are a pain. Database-bound, inconsistently failing tests are the worst!

The following commit message is from a real code base:

Run in transactions by default.

When we added controller specs they weren’t being run w/any kind of DB cleaner b/c there was no default strategy and they weren’t explicitly included in a group.…

Older posts