|
From: Mike C. <mik...@gm...> - 2007-09-12 18:18:17
|
I may be missing something, but I don't quite see why this is a big deal. In your situation I'd do essentially the same thing Mike Mason suggested - assign the mock in SetUp , do your Stubbing in a helper method called at the start of each test that needs it, and Expect as needed _before_ calling that helper. If it's really only a tiny minority of tests that need the special behavior and you don't like the helper calls in every test, call the helper from SetUp and reassign the mock before customizing it. - Mike On 12/09/2007, rdr...@ar... <rdr...@ar...> wrote: > > I would have to do a lot more "Copy&Paste" inheritance if i am unable to override a speccific setup. For a simple view with 5 Events i would have to create 5 different setup functions, which would all differe in one line. And there is no way to refactor this out. |