1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove driver-specific hard-coding in the tests.

This commit is contained in:
Dennis Taylor 2017-07-07 11:28:47 -07:00
parent 79c8fa7c64
commit 8219e17763

View file

@ -230,7 +230,7 @@ module ActiveRecord
end
assert_instance_of ActiveRecord::StatementInvalid, error
assert_instance_of syntax_error_exception_class, error.cause
assert_kind_of Exception, error.cause
end
def test_select_all_always_return_activerecord_result
@ -283,14 +283,6 @@ module ActiveRecord
assert_not_nil error.message
end
end
private
def syntax_error_exception_class
return Mysql2::Error if defined?(Mysql2)
return PG::SyntaxError if defined?(PG)
return SQLite3::SQLException if defined?(SQLite3)
end
end
class AdapterForeignKeyTest < ActiveRecord::TestCase