aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation_test.rb
diff options
context:
space:
mode:
authorDaniel Colson <danieljamescolson@gmail.com>2018-01-24 21:14:10 -0500
committerDaniel Colson <danieljamescolson@gmail.com>2018-01-25 23:32:58 -0500
commit0d50cae996c51630361e8514e1f168b0c48957e1 (patch)
treedfbf9609ff6f3d859e584874ac6d8bdc91304c08 /activerecord/test/cases/relation_test.rb
parent8baca31dbe522cb407f0b3b8c8d3d4a6804e5aed (diff)
downloadrails-0d50cae996c51630361e8514e1f168b0c48957e1.tar.gz
rails-0d50cae996c51630361e8514e1f168b0c48957e1.tar.bz2
rails-0d50cae996c51630361e8514e1f168b0c48957e1.zip
Use respond_to test helpers
Diffstat (limited to 'activerecord/test/cases/relation_test.rb')
-rw-r--r--activerecord/test/cases/relation_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb
index 3d64bfb810..14a24351bd 100644
--- a/activerecord/test/cases/relation_test.rb
+++ b/activerecord/test/cases/relation_test.rb
@@ -242,10 +242,10 @@ module ActiveRecord
def test_respond_to_for_non_selected_element
post = Post.select(:title).first
- assert_equal false, post.respond_to?(:body), "post should not respond_to?(:body) since invoking it raises exception"
+ assert_not_respond_to post, :body, "post should not respond_to?(:body) since invoking it raises exception"
silence_warnings { post = Post.select("'title' as post_title").first }
- assert_equal false, post.respond_to?(:title), "post should not respond_to?(:body) since invoking it raises exception"
+ assert_not_respond_to post, :title, "post should not respond_to?(:body) since invoking it raises exception"
end
def test_select_quotes_when_using_from_clause