test/dbd/general/test_statement.rb in dbd-odbc-0.2.2 vs test/dbd/general/test_statement.rb in dbd-odbc-0.2.3

- old
+ new

@@ -1,6 +1,15 @@ @class = Class.new(DBDConfig.testbase(DBDConfig.current_dbtype)) do + + def test_execute + assert_nothing_raised do + @dbh.execute("select * from names order by age") do |sth| + assert_equal([["Joe", 19], ["Bob", 21], ["Jim", 30]], sth.fetch_all) + end + end + end + def test_quoting # FIXME breaks sqlite-ruby to a segfault - research @sth = nil assert_nothing_raised do if dbtype == "postgresql" @@ -112,11 +121,11 @@ assert @sth.any? assert @sth.rows.zero? @sth.finish end - def test_execute + def test_prepare_execute assert_nothing_raised do @sth = @dbh.prepare("select * from names") @sth.execute @sth.finish end @@ -132,10 +141,10 @@ @sth.execute("Bill", 22); @sth.finish end end - def test_execute_with_transactions + def test_prepare_execute_with_transactions @dbh["AutoCommit"] = false config = DBDConfig.get_config['sqlite3'] # rollback 1 (the right way) @sth = nil