Unit test is failing when I am using SQLite


#1

Hi,

There seems to be an issue with SQLite adapter. Any idea what is causing
it?

document_test.rb contains default scaffold and works fine with MySQL but
fails with SQLite. Other unit tests work fine with either DB.

Sergei S.
Red Leaf Software LLC
http://www.redleafsoft.com

document_test.rb:

require File.dirname(FILE) + ‘/…/test_helper’

class DocumentTest < Test::Unit::TestCase
fixtures :documents

Replace this with your real tests.

def test_truth
assert true
end
end

error:

C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32
/lib/sqlite3/errors.rb:94:in check': SQL logic error or missing database (SQLit e3::SQLException) from C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby- 1.1.0-mswin32/lib/sqlite3/resultset.rb:76:incheck’
from
C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-
1.1.0-mswin32/lib/sqlite3/resultset.rb:68:in commence' from C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby- 1.1.0-mswin32/lib/sqlite3/resultset.rb:61:ininitialize’
from
C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-
1.1.0-mswin32/lib/sqlite3/statement.rb:158:in execute' from C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby- 1.1.0-mswin32/lib/sqlite3/database.rb:211:inexecute’
from
C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-
1.1.0-mswin32/lib/sqlite3/database.rb:186:in prepare' from C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby- 1.1.0-mswin32/lib/sqlite3/database.rb:210:inexecute’
from
C:/rails/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-
1.1.0-mswin32/lib/sqlite3/database.rb:620:in rollback' ... 13 levels... from C:/rails/InstantRails-1.0/ruby/lib/ruby/1.8/test/unit/autorunner.rb :200:inrun’
from
C:/rails/InstantRails-1.0/ruby/lib/ruby/1.8/test/unit/autorunner.rb
:13:in `run’
from
C:/rails/InstantRails-1.0/ruby/lib/ruby/1.8/test/unit.rb:285
from test/unit/document_test.rb:7