Sha256: 8d641248d38de0e5bdec7e16328a65a51287452391f0be071a44aa6d7a7beb5c
Contents?: true
Size: 753 Bytes
Versions: 5
Compression:
Stored size: 753 Bytes
Contents
require File.join(File.dirname(__FILE__), '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
5 entries across 5 versions & 2 rubygems