Permalink
Browse files

Merge pull request #31492 from prathamesh-sonpatki/rm-assert-nothing-…

…raised

assert_nothing_raised not required here, we can assert directly for the actual result
  • Loading branch information...
eileencodes committed Dec 19, 2017
2 parents 0863335 + eaf639c commit 1ba72fd66be3c60c916c7a779c5001ed38675333
Showing with 2 additions and 4 deletions.
  1. +2 −4 activerecord/test/cases/finder_test.rb
@@ -287,10 +287,8 @@ def test_exists_with_distinct_association_includes_limit_and_order
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

0 comments on commit 1ba72fd

Please sign in to comment.