[Nitro] Isolated specs bundle

Jonathan Buch john at oxyliquit.de
Tue Mar 6 02:25:12 EST 2007


Hi,

> The attached patch bundle changes the way specs run so that each spec
> gets it's own shot at the database - there shouldn't be any carryover,
> which is pretty crucial to proper testing.  Also, Postgres is much
> quieter now.

in earlier days each test would open its own og connection, I had then
(for myself) made a change so the og-stores would be reused.  This had
the huge advantage of the tests running much faster through.

The tests itself will not interfere with each other (because of each
test residing in its own class and so getting different table names.

Maybe something similar can be done with Specs, just put every og class
into a class called like the filename.

Of course, the og startup is much better nowadays (at least when using
Og.setup(:classes => [Klass]).

> One issue with it right now is that each spec file needs to be run
> individually.  If anyone can figure out why, I'd love it.

Maybe a test script (script/test.rb) can be created for specs as well?

Jo

-- 
Feel the love
http://pinkjuice.com/pics/ruby.png


More information about the Nitro-general mailing list