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

Fix assertions in AR::TestCase::AttributeMethodsTest

This test has always been green because it uses "assert" and the first
argument is an truthy class/object.
This commit is contained in:
Yuki Nishijima 2014-09-21 11:34:37 -07:00
parent cdbb206186
commit 0756375fb4

View file

@ -738,9 +738,9 @@ class AttributeMethodsTest < ActiveRecord::TestCase
error = assert_raises(ActiveRecord::UnknownAttributeError) {
@target.new(:hello => "world")
}
assert @target, error.record
assert "hello", error.attribute
assert "unknown attribute: hello", error.message
assert_instance_of @target, error.record
assert_equal "hello", error.attribute
assert_equal "unknown attribute: hello", error.message
end
def test_methods_override_in_multi_level_subclass