rubocop / minitest-style-guide

Best practices for writing your tests
https://minitest.rubystyle.guide
70 stars 15 forks source link

Guides for assertion matcher. #15

Closed abhaynikam closed 2 years ago

abhaynikam commented 5 years ago

Following are the assertion for which guides are still remaining. I am planning to work on them today and Raise PRs for each. Please do let me know if there is any objection or concern regarding adding any of the matchers or the way I work. 😄

FYI, I haven't used few of the matchers at all. I would be trying them on sample application and then raise the PRs 🙏

cc/ @koic @bbatsov

koic commented 5 years ago

assert_send method is a deprecated method. https://github.com/seattlerb/minitest/blob/ab39d35fb4e84eb866ed9c4ecb707cbf3889de42/lib/minitest/assertions.rb#L393-L407

ingemar commented 2 years ago

Is there any reason why assert_same_elements isn't included in the guide?

andyw8 commented 2 years ago

There no such method in minitest, it's added by other libraries, e.g. https://www.rubydoc.info/gems/minitest-rails-shoulda/0.4.1/MiniTest%2FAssertions%3Aassert_same_elements

ingemar commented 2 years ago

Ah! My bad! 😄