Sha256: 36d8f20de4f054ebf34d9360718e4bda8126eaabbb17dc648112ba72975f9130
Contents?: true
Size: 854 Bytes
Versions: 3
Compression:
Stored size: 854 Bytes
Contents
require 'test/unit' require 'fileutils' DBDConfig.set_testbase(:odbc, Class.new(Test::Unit::TestCase) do def dbtype "odbc" end def test_base assert_equal(@dbh.driver_name, "odbc") assert_kind_of(DBI::DBD::ODBC::Database, @dbh.instance_variable_get(:@handle)) end def set_base_dbh config = DBDConfig.get_config['odbc'] @dbh = DBI.connect("dbi:ODBC:#{config['dbname']}", config['username'], config['password']) end def setup set_base_dbh DBDConfig.inject_sql(@dbh, dbtype, "dbd/odbc/up.sql") end def teardown @sth.finish if @sth && !@sth.finished? DBDConfig.inject_sql(@dbh, dbtype, "dbd/odbc/down.sql") @dbh.disconnect end end )
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dbd-odbc-0.2.2 | test/dbd/odbc/base.rb |
dbd-odbc-0.2.3 | test/dbd/odbc/base.rb |
dbd-odbc-0.2.4 | test/dbd/odbc/base.rb |