I asked this in a couple of Rails places without luck. I guess this
is actually related to Rails, just ask it here in case someone knows
about it.
The file config/database.yml rails generates has as SQLite database
for testing ":memory:", but the simplest of the tests in the Agile
book does not work, it produces this trace:
% ruby test/unit/product_test.rb
Loaded suite test/unit/product_test
Started
E/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/
errors.rb:94:in `check': cannot rollback - no transaction is active
(SQLite3::SQLException)
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/
lib/sqlite3/resultset.rb:76:in `check'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/
lib/sqlite3/resultset.rb:68:in `commence'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/
lib/sqlite3/resultset.rb:61:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/
lib/sqlite3/statement.rb:158:in `execute'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/
lib/sqlite3/database.rb:211:in `execute'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/
lib/sqlite3/database.rb:186:in `prepare'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/
lib/sqlite3/database.rb:210:in `execute'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/
lib/sqlite3/database.rb:620:in `rollback'
... 11 levels...
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:200:in
`run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in
`run'
from /usr/local/lib/ruby/1.8/test/unit.rb:285
from test/unit/product_test.rb:11
I am lost here. Does that ring any bell? Tests run fine with a
regular SQLite database.
-- fxn
"We all agree on the necessity of compromise. We just can't agree on
when it's necessary to compromise."
-- Larry Wall in comp.lang.perl