Hey David, thanks for your time and reply (the creator of RSpec, whooohooo! :)).

I get your point about expectations on objects undergoing test, but then I wonder what's the best way to go about it when you want to test a specific method in isolation of its same-object-method dependencies? I don't recall having seen such warnings in the RSpec book (but, granted, I read that quite a while ago).

Also, I don't believe the "hidden re-instanciation" is the issue at play here, as I'm not doing anything between @product.should_receive and @product.min_money(…).should.

However, the logs tell me the AR instanciation actually happens AFTER my '1>' marker, so perhaps you're right, but then why can't I rely on the before block being actually run, AR-wise, BEFORE my description?!

As for Ruby and gems, nope, last clear run was on the same basis. However, the code being exercised did change, but not the specific part I'm grappling with here (expectations on methods then being called internally) by the tested method.

Thanks again for your time, I appreciate it.

--
Christophe Porteneuve
Directeur technique, Ciblo.net
[email protected]

--
You received this message because you are subscribed to the Google Groups 
"rspec" 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 
http://groups.google.com/group/rspec?hl=en.

Reply via email to