From eaf639c76b2df54b8ddf6741a91b34d113eae0cf Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Sun, 17 Dec 2017 13:17:28 +0530 Subject: assert_nothing_raised not required here, we can assert directly for the actual result --- activerecord/test/cases/finder_test.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 62d5d88fcc..8369a10b5a 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -287,10 +287,8 @@ class FinderTest < ActiveRecord::TestCase end def test_exists_should_reference_correct_aliases_while_joining_tables_of_has_many_through_association - assert_nothing_raised do - developer = developers(:david) - developer.ratings.includes(comment: :post).where(posts: { id: 1 }).exists? - end + developer = developers(:david) + assert_not_predicate developer.ratings.includes(comment: :post).where(posts: { id: 1 }), :exists? end def test_exists_with_empty_table_and_no_args_given -- cgit v1.2.3