Steve Ross wrote:
[...]
> Also consider using a mocking/
> stubbing framework. rSpec comes with one baked in, or you can use
> Mocha or FlexMock. Best to only mock and stub in unit tests, as
> acceptance tests are supposed to exercise the whole stack.

I find that since I started using Machinist, I've completely stopped 
using mock_model.


>  Of course,
> if your app needs to reach out over the network or something like
> that, you might have to use something like FakeWeb or a mock/stub for
> the service you don't want to hit with your test.

Yeah.  Phlip (whom I generally consider a testing guru) suggests that's 
that's the only thing to mock; then again, he also uses fixtures and 
dislikes RSpec. :). OTOH, Martin Fowler (I think), whom I also tend to 
trust, says to mock everything that isn't what you're directly testing. 
Probably the best approach lies somewhere in between, but I don't know 
where...

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to