Sha256: e42a6c91af27d06d6d7fa0970a45532951d0e8b4f97dff5a1c866fa1bc21ae1d
Contents?: true
Size: 511 Bytes
Versions: 5
Compression:
Stored size: 511 Bytes
Contents
require File.join(File.dirname(__FILE__), 'helper') class TC_Errors < Test::Unit::TestCase (1..26).each do |code| define_method( "test_error_code_%02d" % code ) do db = stub('database', :errmsg => 'message') begin SQLite3::Error.check( code, db ) rescue SQLite3::Exception => e assert_instance_of SQLite3::EXCEPTIONS[code], e assert_equal code, e.code assert_equal code, e.class.code assert_equal "message", e.message end end end end
Version data entries
5 entries across 5 versions & 2 rubygems