[rspec-users] Mocks and Refactoring - doing it wrong?
Sebastian W.
lists at ruby-forum.com
Thu Oct 30 19:52:27 EDT 2008
> No idea why you couldn't pass a flag for regression testing:
>
> mock(Foo, :check_methods => true)
>
> Scott
It seems to me this way, too - though I'm obviously biased. :)
It's true that a lot of the dynamic stuff could be problematic - what if
the flag was only for checking methods directly implemented on that
class? Though I guess that'd lead down a potential dark path where you'd
then also want the "mock" method to potentially check all mixins and
validate, etc. etc.
On the other hand, maybe it could serve as a gentle remonstrance to
folks to not overdo it with the "i am an 3l337 ninj4 haxx0r"
metaprogramming? Just a thought.
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list