diff options
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rw-r--r-- | activerecord/test/finder_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 073eea92ad..5ac6f2348c 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -96,7 +96,13 @@ class FinderTest < Test::Unit::TestCase end def test_find_only_some_columns - assert_raises(NoMethodError) { Topic.find(1, :select => "author_name").title } + topic = Topic.find(1, :select => "author_name") + assert_raises(NoMethodError) { topic.title } + assert_equal "David", topic.author_name + assert !topic.attribute_present?("title") + assert !topic.respond_to?("title") + assert topic.attribute_present?("author_name") + assert topic.respond_to?("author_name") end def test_find_on_conditions |