hehe, tbh even if the documentation had been there i probably wouldn&#39;t have read it :)<br><br>thanks!<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 8:08 AM, Max Williams<br> <br>&lt;<a href="mailto:toastkid.williams@gmail.com">toastkid.williams@gmail.com</a>&gt; wrote:<br> &gt;<br> &gt;<br> &gt;<br> &gt; On 26/02/2008, David Chelimsky &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>&gt; wrote:<br>
 &gt; &gt;<br> &gt; &gt; On Tue, Feb 26, 2008 at 7:39 AM, Max Williams<br> &gt; &gt; &lt;<a href="mailto:toastkid.williams@gmail.com">toastkid.williams@gmail.com</a>&gt; wrote:<br> &gt; &gt;<br> &gt; &gt;<br> &gt; &gt;<br>
 &gt; &gt; This does not happen for you implicitly when you use before(:all)<br> &gt; &gt; because there is no mechanism for running a group of examples in a<br> &gt; &gt; transaction.<br> &gt;<br> &gt; ah...i see.&nbsp;&nbsp;I didn&#39;t know about that last bit. :)<br>
 <br> <br>FYI: <a href="http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/310">http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/310</a><br> <br> Cheers,<br> <br>David<br> <br><br> &gt;<br> &gt; &gt; &gt; My problem, though, is that the data is left over from the last time (in<br>
 &gt; &gt; &gt; fact all previous times) that i ran the spec file, where i thought that<br> &gt; it<br> &gt; &gt; &gt; was cleared out.&nbsp;&nbsp;Do i need to explicitly tell the database to clear all<br> &gt; the<br> &gt; &gt; &gt; records in an &#39;after&#39; block?<br>
 &gt; &gt;<br> &gt; &gt;<br> &gt; &gt; Yes.&nbsp;&nbsp;If you want to use before(:all) to set up data, you need to use<br> &gt; &gt; after(:all) to clean it up explicitly.<br> &gt; &gt;<br> &gt; &gt; Please beware that this approach is extremely error prone over time.<br>
 &gt; &gt; If you ever introduce a side effect (intentionally or accidentally)<br> &gt; &gt; that modifies the data, you&#39;re going to look at the spec, see the data<br> &gt; &gt; you&#39;re setting up and incorrectly think that that&#39;s the data every<br>
 &gt; &gt; example is using. It is much, much safer (and more sane) to use<br> &gt; &gt; before(:each) even though it may slow things down a bit.<br> &gt;<br> &gt; Gotcha.&nbsp;&nbsp;Thanks!<br> &gt;<br> &gt; &gt; HTH,<br> &gt; &gt;<br>
 &gt; &gt; David<br> &gt; &gt;<br> &gt; &gt;<br> &gt; &gt;<br> &gt;<br> &gt;<br> <br>&gt; _______________________________________________<br> &gt;&nbsp;&nbsp;rspec-users mailing list<br> &gt;&nbsp;&nbsp;<a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
 &gt;&nbsp;&nbsp;<a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br> &gt;<br> _______________________________________________<br> rspec-users mailing list<br> <a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
 <a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br> </blockquote></div><br>