Is it a good idea to mock/stub in integration tests?

Posted by ez on Stack Overflow See other posts from Stack Overflow or by ez
Published on 2010-03-09T02:59:42Z Indexed on 2010/03/09 3:06 UTC
Read the original article Hit count: 343

Say there are multiple requests in a integration test, some of them are sphinx calls(locator for example).

Should we just stub out the entire response of these sphinx call, or, since it is a integration test, we want to excise the entire test without stubbing. If that is the case, how do we still keep test independent in the situation when sphinx fails, no internet connection, or third party server non-responsive.

Give reasons.

Thanks

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about rails