Sha256: 813d1f5b714784a3145824daa469b80a7e21a126078e8a8b16cc17e9634c28e3
Contents?: true
Size: 650 Bytes
Versions: 15
Compression:
Stored size: 650 Bytes
Contents
$: << 'lib' require 'test/unit' require 'dbi' class TC_DBI_StatementHandle < Test::Unit::TestCase def test_fetch mock_handle = 'any_object' def mock_handle.cancel; end def mock_handle.column_info; {}; end def mock_handle.fetch; nil; end sth = DBI::StatementHandle.new( mock_handle, true, true, false, true) 10.times do assert_nil sth.fetch end sth.raise_error = true assert_raises(DBI::InterfaceError) do sth.fetch end sth.raise_error = false 10.times do assert_nil sth.fetch end end end
Version data entries
15 entries across 15 versions & 3 rubygems