Forum: Ruby on Rails Unit test is failing when I am using SQLite

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5b336f18b089138ec0968b2d9f12f03b?d=identicon&s=25 Sergei Serdyuk (sserdyuk)
on 2006-04-11 20:44
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 Serdyuk
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:in `check'
        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:in `initialize'
        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: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: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: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:620:in `rollback'
         ... 13 levels...
        from
C:/rails/InstantRails-1.0/ruby/lib/ruby/1.8/test/unit/autorunner.rb
:200:in `run'
        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
This topic is locked and can not be replied to.