Class: TC_MysqlStmt
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- TC_MysqlStmt
- Defined in:
- ext/test.rb
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
378 379 380 381 382 383 384 385 |
# File 'ext/test.rb', line 378 def setup() @host, @user, @pass, db, port, sock, flag = ARGV @db = db || "test" @port = port.to_i @sock = sock.nil? || sock.empty? ? nil : sock @flag = flag.to_i @m = Mysql.new(@host, @user, @pass, @db, @port, @sock, @flag) end |
#teardown ⇒ Object
386 387 |
# File 'ext/test.rb', line 386 def teardown() end |
#test_init ⇒ Object
389 390 391 392 393 394 395 |
# File 'ext/test.rb', line 389 def test_init() if @m.server_version >= 40100 then s = @m.stmt_init() assert_equal(Mysql::Stmt, s.class) s.close end end |
#test_prepare ⇒ Object
397 398 399 400 401 402 403 |
# File 'ext/test.rb', line 397 def test_prepare() if @m.server_version >= 40100 then s = @m.prepare("select 1") assert_equal(Mysql::Stmt, s.class) s.close end end |