<br><br><div><span class="gmail_quote">On 26/02/2008, <b class="gmail_sendername">David Chelimsky</b> &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Feb 26, 2008 at 7:39 AM, Max Williams<br> &lt;<a href="mailto:toastkid.williams@gmail.com">toastkid.williams@gmail.com</a>&gt; wrote:<br><br> <br> This does not happen for you implicitly when you use before(:all)<br>
 because there is no mechanism for running a group of examples in a<br> transaction.</blockquote><div><br>ah...i see.&nbsp; I didn&#39;t know about that last bit. :)<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 &gt; My problem, though, is that the data is left over from the last time (in<br> &gt; fact all previous times) that i ran the spec file, where i thought that it<br> &gt; was cleared out.&nbsp;&nbsp;Do i need to explicitly tell the database to clear all the<br>
 &gt; records in an &#39;after&#39; block?<br> <br> <br>Yes.&nbsp;&nbsp;If you want to use before(:all) to set up data, you need to use<br> after(:all) to clean it up explicitly.<br> <br> Please beware that this approach is extremely error prone over time.<br>
 If you ever introduce a side effect (intentionally or accidentally)<br> that modifies the data, you&#39;re going to look at the spec, see the data<br> you&#39;re setting up and incorrectly think that that&#39;s the data every<br>
 example is using. It is much, much safer (and more sane) to use<br> before(:each) even though it may slow things down a bit.</blockquote><div><br>Gotcha.&nbsp; Thanks! <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 HTH,<br> <br>David<br> <br><br></blockquote></div><br>