Sha256: 4df16d7da029f85f42a19984037edf8255027153f11a2fb990af00fa769bb4a6

Contents?: true

Size: 718 Bytes

Versions: 45

Compression:

Stored size: 718 Bytes

Contents

require 'helper'

class TC_OpenClose < Test::Unit::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

45 entries across 45 versions & 5 rubygems

Version Path
challah-0.6.2 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.6.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.6.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.5.4 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.5.3 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.5.2 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.5.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/sqlite3-1.3.4/test/test_integration_open_close.rb
challah-0.5.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.4.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.4.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.3.5 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.3.4 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.3.3 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.3.2 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.3.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.3.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.2.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
challah-0.2.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_integration_open_close.rb
sqlite3-1.3.5-x86-mswin32-60 test/test_integration_open_close.rb