Permalink
Browse files

Backport test assertions from 65469a6 (the behaviour is already the s…

…ame, but we need to assertions to guard against regressions)
  • Loading branch information...
1 parent 1302443 commit bd0fe87501755fcfeef67808d5f2a257eea90ea8 @jonleighton jonleighton committed Apr 15, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/test/cases/finder_test.rb
@@ -257,9 +257,10 @@ def test_unexisting_record_exception_handling
def test_find_only_some_columns
topic = Topic.find(1, :select => "author_name")
assert_raise(ActiveModel::MissingAttributeError) {topic.title}
+ assert_nil topic.read_attribute("title")
assert_equal "David", topic.author_name
assert !topic.attribute_present?("title")
- #assert !topic.respond_to?("title")
+ assert !topic.attribute_present?(:title)
assert topic.attribute_present?("author_name")
assert_respond_to topic, "author_name"
end

0 comments on commit bd0fe87

Please sign in to comment.