Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert_nothing_raised not required here, we can assert directly for the actual result #31492

Merged

Conversation

prathamesh-sonpatki
Copy link
Member

r? @kamipo

developer.ratings.includes(comment: :post).where(posts: { id: 1 }).exists?
end
developer = developers(:david)
assert_equal false, developer.ratings.includes(comment: :post).where(posts: { id: 1 }).exists?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prathamesh-sonpatki can you change this to use assert_predicate instead? I think it reads better that way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used assert_not_predicate.

@prathamesh-sonpatki
Copy link
Member Author

@eileencodes Done!

@eileencodes eileencodes merged commit 1ba72fd into rails:master Dec 19, 2017
@prathamesh-sonpatki prathamesh-sonpatki deleted the rm-assert-nothing-raised branch December 19, 2017 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants