[rspec-users] testing behaviour or testing code?
peter_marklund at fastmail.fm
Mon Sep 3 03:07:59 EDT 2007
> There's a very useful guideline in TDD that says "test YOUR code, not
> everyone elses." The validation library we're testing here is
> ActiveRecord's. It's already tested (we hope!).
Personally, I don't have the courage to assume Rails code is always
working. I know from experience it doesn't always work although it is
quite solid in general. The Rails code has been tested but not in
conjunction with my particular apps. I also want to test my
assumptions of how the Rails API works, maybe it doesn't work as I
think. Having tests/specs that cover Rails interaction with my app,
which higher level tests of course naturally do (system/integration
tests), gives me much more courage to upgrade Rails as well.
More information about the rspec-users