<br><br><div><span class="gmail_quote">On 4/12/07, <b class="gmail_sendername">Jonathan Buch</b> &lt;<a href="mailto:john@oxyliquit.de">john@oxyliquit.de</a>&gt; wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Judson Lester:&nbsp;&nbsp;I hope you aren&#39;t yet fed up with Nitro and are still<br>with us to help with that issue.&nbsp;&nbsp;The spec/test ratio is a little<br>frightening right now and myself I&#39;m not yet fully comfortable with<br>
specs.</blockquote><div><br>Not fed up.&nbsp; Just absorbed on other projects.&nbsp; I&#39;m still around, and Og especially is high on my list of projects.<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Btw, what was the reason to call use a destroying launch_og configuration?<br>My guess is, that you feared clashes between classes.&nbsp;&nbsp;At one time I<br>dedicated quite some time to make all tests run &#39;together&#39;.&nbsp;&nbsp;This is
<br>done by using a different &#39;namespace&#39; for each test.&nbsp;&nbsp;This greatly<br>reduces the time the tests take (I loathe too long useless testing/starting<br>times, which is why also a :classes option for Og.start exists).
</blockquote><div><br><br>I was destroying the db after each test in order to make sure that each spec is independent.&nbsp; The classes are one thing, entries in the db are another. <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;">
## spec/store.rb<br>context &quot;A store&quot;<br>&nbsp;&nbsp; setup do<br>&nbsp;&nbsp;&nbsp;&nbsp; module SpecStore<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class User<br><br>Would this structure be ok to use for all specs</blockquote><div><br>Yes, this&#39;ll successfully restrict the class defs to the context they&#39;re part of.
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> and could the quick_setup<br>be revised to reuse a single Og connection?</blockquote>
<div><br>Maybe, but: the real problem, IMO, is that storing stuff to a database is necessarily a stateful operation.&nbsp; So, if the DB isn&#39;t destroyed between specs, the specification isn&#39;t really valid, you know?<br>
<br>One possibility that I like would be to use SQLite in memory mode, since that&#39;d be blazing to setup and teardown - except that SQLite doesn&#39;t seem to like to drop and database unless all the connections on it are properly closed.&nbsp; I&#39;m pretty sure that it could be made to work, but just swapping in SQLite with a :memory option results in a failures because the DB doesn&#39;t get dropped.
<br>&nbsp;<br>If that can&#39;t be worked, maybe separate dbs could be created by threads and made available in order?&nbsp; That&#39;s probably a little baroque.<br><br>Judson<br></div></div>-- <br>Q: How does a hacker escape handcuffs?
<br>A: Backslashes.