On Wed, Oct 29, 2008 at 5:32 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> I think the answer is: if you have to ask, then you should use them :)
> Otherwise, don't use them when you feel confident that you don't need
> them.

Or use them, but don't knock yourself out trying to keep them perfect
with total isolation and all data interactions mocked.  I'm writing
controller specs now hitting the real models instead of mocks, setting
expectations on method calls only in specific examples to test them.
I'm finding I'm much more productive on specs now and my blood
pressure is lower.

Controller specs are a good thing.  Controllers are the heart of your
application.  The heart may be a simple muscle, but your doctor will
still tell you it ought to be tested.  It's not hard to test either,
unless you insist on building a delicate network of veins and arteries
outside your body to simulate the ones inside it.  I don't believe the
heart needs to be removed to prove it's working.


-- 
Have Fun,
   Steve Eley ([EMAIL PROTECTED])
   ESCAPE POD - The Science Fiction Podcast Magazine
   http://www.escapepod.org
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to