[rspec-users] Mocks? Really?
priit at mx.ee
Fri Dec 7 21:30:35 EST 2007
> > This is handy and keeps the view test isolated from changes to your
> > models, but is that really the point?
I was very confused first as well. It didn't make any point to me and
I'm not using it at all. As far as I know, I take it as an optional
tool to go nuts with views when needed. I will use it when some stuff
in view becomes super important to be there. However as an one-band
project I haven't feel this need yet.
Second thing is about how you like to develop your stuff. As far as I
know David start with Story -> Views -> controller -> model. I prefer
to go this way: Story -> model/controller -> views. So now you might
guess why specing views are nice thing when you go David's way
Anyhow, mocking in controllers (and in views) makes much more sense
now with story runner in the big picture. General stuff 'does it work
at all' goes to story runner and specific low level stuff goes to
spec. So it's up to you if you care about low level stuff in views.
One thing what I still don't like so much is that rspec "force" you to
develop things super vertically or otherwise your mocks will be out of
sync very quickly. Correct me if I'm wrong !!!
PS. somehow autotest does not pick up stories to run. I haven't yet
investigate it why.
More information about the rspec-users