Skip to content

Cop idea: discourage the use of assert_/refute_ Minitest matchers #7

@pirj

Description

@pirj

Suggested by @Darhazer

RSpec Expectations allows using assert_/refute_ Minitest matchers
However, RSpec comes with its matchers that pretty much cover the same:

- assert_equal a, b
+ expect(a).to eq(b)

A notable difference is that Minitest allows for an optional failure message.
It's a lesser known RSpec feature, but it allows it, too:

- assert_equal a, b, "must be equal"
+ expect(a).to(eq(b), "must be equal")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions