Sha256: a74e2deab9de4422623bcf6cf9a6cbfc36775319d9a72a960c74c468d19de342

Contents?: true

Size: 715 Bytes

Versions: 403

Compression:

Stored size: 715 Bytes

Contents

require 'helper'

class TC_OpenClose < SQLite3::TestCase
  def test_create_close
    begin
      db = SQLite3::Database.new( "test-create.db" )
      assert File.exist?( "test-create.db" )
      assert_nothing_raised { db.close }
    ensure
      File.delete( "test-create.db" ) rescue nil
    end
  end

  def test_open_close
    begin
      File.open( "test-open.db", "w" ) { |f| }
      assert File.exist?( "test-open.db" )
      db = SQLite3::Database.new( "test-open.db" )
      assert_nothing_raised { db.close }
    ensure
      File.delete( "test-open.db" ) rescue nil
    end
  end

  def test_bad_open
    assert_raise( SQLite3::CantOpenException ) do
      SQLite3::Database.new( "." )
    end
  end
end

Version data entries

403 entries across 366 versions & 26 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/sqlite3-1.7.3-arm64-darwin/test/test_integration_open_close.rb
sqlite3-1.7.3 test/test_integration_open_close.rb
sqlite3-1.7.3-x86_64-linux test/test_integration_open_close.rb
sqlite3-1.7.3-x86_64-darwin test/test_integration_open_close.rb
sqlite3-1.7.3-x86-linux test/test_integration_open_close.rb
sqlite3-1.7.3-x64-mingw32 test/test_integration_open_close.rb
sqlite3-1.7.3-x64-mingw-ucrt test/test_integration_open_close.rb
sqlite3-1.7.3-arm64-darwin test/test_integration_open_close.rb
sqlite3-1.7.3-arm-linux test/test_integration_open_close.rb
sqlite3-1.7.3-aarch64-linux test/test_integration_open_close.rb
sqlite3-1.7.2 test/test_integration_open_close.rb
sqlite3-1.7.2-x86_64-linux test/test_integration_open_close.rb
sqlite3-1.7.2-x86_64-darwin test/test_integration_open_close.rb
sqlite3-1.7.2-x86-linux test/test_integration_open_close.rb
sqlite3-1.7.2-x64-mingw32 test/test_integration_open_close.rb
sqlite3-1.7.2-x64-mingw-ucrt test/test_integration_open_close.rb
sqlite3-1.7.2-arm64-darwin test/test_integration_open_close.rb
sqlite3-1.7.2-arm-linux test/test_integration_open_close.rb
sqlite3-1.7.2-aarch64-linux test/test_integration_open_close.rb
sqlite3-1.7.1 test/test_integration_open_close.rb