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

Include a Cop to enforce refute(actual) over assert_equal(false) #18

Merged
merged 1 commit into from Oct 11, 2019

Conversation

duduribeiro
Copy link
Contributor

This commit adds a Cop that checks some usage of
assert_equal(false, something) and enforces the usage of
refute(something) instead.

Replace this text with a summary of the changes in your PR.
The more detailed you are, the better.


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@koic
Copy link
Member

koic commented Sep 28, 2019

Can you add the changelog entry about this one?

@duduribeiro duduribeiro force-pushed the add_cop_for_refute_false branch 2 times, most recently from 24ac75e to 43525ea Compare October 3, 2019 21:05
@duduribeiro
Copy link
Contributor Author

@koic sorry for the late response. I did add the entry into the changelog. thanks so much

CHANGELOG.md Outdated Show resolved Hide resolved
This commit adds a Cop that checks some usage of
`assert_equal(false, something)` and enforces the usage of
`refute(something)` instead.
@duduribeiro
Copy link
Contributor Author

@bbatsov, @koic I did update the branch with the changes suggested here. Thanks

@bbatsov bbatsov merged commit 68bc547 into rubocop:master Oct 11, 2019
@bbatsov
Copy link
Contributor

bbatsov commented Oct 11, 2019

Thanks!

@duduribeiro duduribeiro deleted the add_cop_for_refute_false branch October 11, 2019 14:47
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

4 participants