Sha256: d0f3a587f77fb21ebf351708014088cbcfde03c6a733b34dcbd137f55ceccd60

Contents?: true

Size: 757 Bytes

Versions: 10

Compression:

Stored size: 757 Bytes

Contents

DBDConfig.set_testbase(:mysql, Class.new(Test::Unit::TestCase) do
        def dbtype 
            "mysql"
        end

        def test_base
            assert_equal(@dbh.driver_name, "Mysql")
            assert_kind_of(DBI::DBD::Mysql::Database, @dbh.instance_variable_get(:@handle))
        end

        def set_base_dbh
            config = DBDConfig.get_config["mysql"]
            @dbh = DBI.connect("dbi:Mysql:"+config["dbname"], config["username"], config["password"], { })
        end

        def setup
            set_base_dbh
            DBDConfig.inject_sql(@dbh, dbtype, "dbd/mysql/up.sql")
        end

        def teardown
            DBDConfig.inject_sql(@dbh, dbtype, "dbd/mysql/down.sql")
            @dbh.disconnect
        end
    end
)

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
ydbi-0.6.0 test/dbd/mysql/base.rb
ydbi-0.5.7 test/dbd/mysql/base.rb
ydbi-0.5.0 test/dbd/mysql/base.rb
rails-dbd-mysql-0.1.0 test/dbd/mysql/base.rb
dbd-mysql-0.4.4 test/dbd/mysql/base.rb
dbd-mysql-0.4.3 test/dbd/mysql/base.rb
dbd-mysql-0.3.3 test/dbd/mysql/base.rb
dbd-mysql-0.4.2 test/dbd/mysql/base.rb
dbd-mysql-0.4.1 test/dbd/mysql/base.rb
dbd-mysql-0.4.0 test/dbd/mysql/base.rb