Thank you for the elaborate answer. I need to muse a bit about this. Just one quick thought:
On Tue, Sep 11, 2012 at 10:22 PM, Jonathan Tran <[email protected]> wrote: > Also, a test (unit, functional, etc.) will print out a bad value that is > asserted. However, I specifically avoid assertions on intermediate > values which are implementation-dependent, because they make tests > brittle. But these intermediate values are often very useful in fixing > the final result. So I'd like to be able to easily *see* the > intermediate values without having to manually add and remove inspects > or step through the debugger every time. At least that could be fixed with a customized version of assert methods which would also pp a specific instance (or self as default) when the assertion fails so you can see all the internal state. Second thought: you could use set_trace_func and custom assert methods in order to record method calls and state and only output it when the assert fails. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
