<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">I'm also sceptical about having a goal along the lines of "all methods in our code must be invoked explicitly by specs". It's a very low level (too low level IMO) way of approaching the overall behaviour of your app.
<br><br>Aslak</blockquote><div><br>I would also add that it violates some principals of encapsulation. If
you expose an object to perform an action, then an rspec test should
interact with that object to test those actions. And only those
actions exposed by the object. Unit tests should be the vehicle for
testing any methods relied upon by the "outer object" to accomplish the
action.<br>
<br>
I am very new to rspec (and rails), but my interpretation of BDD is
that it should honor principles of encapsulation, and unit testing
should be used for low-level testing. If this is not the spirit of rspec, I would love to know how other people approach it - then I can fix my misperceptions.<br>
<br>
my two cents<br>
Scott Sehlhorst<br><a href="http://tynerblain.com/blog">http://tynerblain.com/blog</a><br></div><br>