On Oct 30, 2008, at 7:52 PM, Sebastian W. wrote:

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.

+1

Tests *are* supposed to influence the way we write production code.

Scott

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to