Wrong exception is occured when raising no translatable exception

Conflicts:
	activerecord/CHANGELOG.md
This commit is contained in:
kennyj
2013-03-01 01:55:20 +09:00
committed by Jon Leighton
parent be913c3964
commit dc2bc388bc
3 changed files with 16 additions and 0 deletions

View File

@@ -188,6 +188,12 @@ module ActiveRecord
assert_equal "DISTINCT posts.title, posts.updater_id AS alias_0", @connection.distinct("posts.title", ["posts.updater_id desc nulls last"])
end
def test_raise_error_when_cannot_translate_exception
assert_raise TypeError do
@connection.send(:log, nil) { @connection.execute(nil) }
end
end
private
def insert(ctx, data)
binds = data.map { |name, value|