I tend to write a fresh description block for every change in the parameters for that specific action, because I hate conditionals in the example describtion, e.g.:<div><br class="webkit-block-placeholder"></div><div>describe SomeController, &quot;handling GET /path/with/param/3&quot; do
</div><div>&nbsp;it &quot;should do this&quot;</div><div>&nbsp;it &quot;should not do this if&quot;</div><div>&nbsp;it &quot;should still do that in both cases&quot;&nbsp;</div><div>end</div><div><br class="webkit-block-placeholder"></div><div>
Seperate description blocks keep things clean, however, there is a big amount of duplication between the two blocks, I do love clarity over cryptic DRY-ed up code (certainly in the examples), but those long blocks make the controller spec file&nbsp;tedious.&nbsp;
</div><div><br>&nbsp;</div><div>Take for instance the code from the following pastie (&nbsp;<a href="http://pastie.caboo.se/99683">http://pastie.caboo.se/99683</a> ). The only difference between the two examples is that, in the first example a cart is retreived using the cart_id from the session, and in the second a new cart is created. Both then find an item and add this item to the cart.
</div><div><br class="webkit-block-placeholder"></div><div>How would you guys rewrite the examples in the provided pastie? (and don&#39;t hesitate to tell me if you have any comments about the way I wrote these examples)</div>