On 8/28/07, Priit Tamboom <[EMAIL PROTECTED]> wrote: > Hi! > > I know you must be answering a lot of basic questions, sorry about that :-) > > However I have not get it, how do you keep mocks updated without pain? > > I reached to the point where mocking things for view. I spec > model-controller-view using "correct doc" way mocking-stubbing (plus I > should run integration test to be sure that everything really works > together). > > Now, when I want to change something in model then basically I have to > change mocks so many places, haven't I? It really feels a little too > messy for me as nuby rspecer. Or it's just my worry and you have to be > so good that you don't have to change things too much after specing > them? If so then I know that I should think much more when mocking(== > designing) things. > > When I googled about this topic I have found similar worries out there > and I got two solutions, where David [1] suggest to write integration > tests (what should indicate that mocks are outdated) and Ryan [2] > suggest to fall bact to fixtures.
I guess that each approach has its cons and pros. The integration test way is the way to go, surely. Fixtures are really a pain to maintain, and a lot of times you have records in there that exist just because you need them to one spec. _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
