Class: TC_OpenClose
- Inherits:
-
SQLite3::TestCase
- Object
- Minitest::Test
- SQLite3::TestCase
- TC_OpenClose
- Defined in:
- lib/sqlite3-1.5.3-arm64-darwin/test/test_integration_open_close.rb,
lib/sqlite3-1.5.3-x86_64-darwin/test/test_integration_open_close.rb
Instance Method Summary collapse
Methods inherited from SQLite3::TestCase
Instance Method Details
#test_bad_open ⇒ Object
25 26 27 28 29 |
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_integration_open_close.rb', line 25 def test_bad_open assert_raise( SQLite3::CantOpenException ) do SQLite3::Database.new( "." ) end end |
#test_create_close ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_integration_open_close.rb', line 4 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 |
#test_open_close ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_integration_open_close.rb', line 14 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 |