<br><br><div><span class="gmail_quote">On 4/12/07, <b class="gmail_sendername">Jonathan Buch</b> <<a href="mailto:john@oxyliquit.de">john@oxyliquit.de</a>> 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: I hope you aren't yet fed up with Nitro and are still<br>with us to help with that issue. The spec/test ratio is a little<br>frightening right now and myself I'm not yet fully comfortable with<br>
specs.</blockquote><div><br>Not fed up. Just absorbed on other projects. I'm still around, and Og especially is high on my list of projects.<br> </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. At one time I<br>dedicated quite some time to make all tests run 'together'. This is
<br>done by using a different 'namespace' for each test. 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. 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 "A store"<br> setup do<br> module SpecStore<br> class User<br><br>Would this structure be ok to use for all specs</blockquote><div><br>Yes, this'll successfully restrict the class defs to the context they'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. So, if the DB isn't destroyed between specs, the specification isn't really valid, you know?<br>
<br>One possibility that I like would be to use SQLite in memory mode, since that'd be blazing to setup and teardown - except that SQLite doesn't seem to like to drop and database unless all the connections on it are properly closed. I'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't get dropped.
<br> <br>If that can't be worked, maybe separate dbs could be created by threads and made available in order? That's probably a little baroque.<br><br>Judson<br></div></div>-- <br>Q: How does a hacker escape handcuffs?
<br>A: Backslashes.