Kerry Buckley What’s the simplest thing that could possibly go wrong?

11 March 2007

DRYing out model specs

Filed under: Agile,Rails,Ruby — Kerry Buckley @ 9:10 pm

[Updated 14/3/07: corrected specify_attributes as per Paul’s comment]
[Updated 18/12/07: modified to avoid crazy RSpec errors]

A week or so ago I wrote about writing specs for simple pieces of functionality (particularly those that are arguably just configuration, like Rails validations). I argued that it’s important to test-drive even the simple things – however, the amount of test code can get out of hand.

(more…)

Powered by WordPress