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

test refactor

This commit is contained in:
Aaron Patterson 2013-05-16 13:33:35 -07:00
parent 711097e6a5
commit 28574961fb

View file

@ -712,12 +712,9 @@ class AttributeMethodsTest < ActiveRecord::TestCase
end end
def test_bulk_update_raise_unknown_attribute_errro def test_bulk_update_raise_unknown_attribute_errro
error = nil error = assert_raises(ActiveRecord::UnknownAttributeError) {
begin
@target.new(:hello => "world") @target.new(:hello => "world")
rescue ActiveRecord::UnknownAttributeError => error }
end
assert error
assert @target, error.record assert @target, error.record
assert "hello", error.attribute assert "hello", error.attribute
assert "unknown attribute: hello", error.message assert "unknown attribute: hello", error.message