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

Fix an error for Minitst/AssertOperator and Minitest/RefuteOperator #275

Merged

Conversation

koic
Copy link
Member

@koic koic commented Nov 23, 2023

This PR fixes the following error for Minitst/AssertOperator and Minitest/RefuteOperator
when running with Ruby 2.7:

$ ruby -v
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-darwin19]

$ bundle exec rake

Finished in 2.522134s, 15.0666 runs/s, 18.6350 assertions/s.

  1) Error: RefuteOperatorTest#test_registers_offense_when_using_refute_with_operator_method_and_message:
FrozenError: can't modify frozen String: "expected, :<, actual"
    /Users/koic/src/github.com/rubocop/rubocop-minitest/lib/rubocop/cop/minitest/refute_operator.rb:46:
    in `build_new_arguments'
    /Users/koic/src/github.com/rubocop/rubocop-minitest/lib/rubocop/cop/minitest/refute_operator.rb:30:
    in `on_send'

And it introduces CI for the oldest RuboCop version still supported, implementing a workflow for regression testing that is similar to the one found a rubocop/rubocop-rails@c9acb7a.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • 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.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@koic koic force-pushed the add_ci_for_the_oldest_supported_rubocop_version branch 6 times, most recently from 890a633 to 7c9e66e Compare November 23, 2023 08:03
@koic koic changed the title Add CI for the oldest supported RuboCop version Fix an error for Minitst/AssertOperator and Minitest/RefuteOperator Nov 23, 2023
@koic koic force-pushed the add_ci_for_the_oldest_supported_rubocop_version branch 2 times, most recently from 7be26a0 to c01dbbb Compare November 24, 2023 04:18
This PR fixes the following error for `Minitst/AssertOperator` and `Minitest/RefuteOperator`
when running with Ruby 2.7:

```console
$ ruby -v
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-darwin19]

$ bundle exec rake

Finished in 2.522134s, 15.0666 runs/s, 18.6350 assertions/s.

  1) Error: RefuteOperatorTest#test_registers_offense_when_using_refute_with_operator_method_and_message:
FrozenError: can't modify frozen String: "expected, :<, actual"
    /Users/koic/src/github.com/rubocop/rubocop-minitest/lib/rubocop/cop/minitest/refute_operator.rb:46:
    in `build_new_arguments'
    /Users/koic/src/github.com/rubocop/rubocop-minitest/lib/rubocop/cop/minitest/refute_operator.rb:30:
    in `on_send'
```

And it introduces CI for the oldest RuboCop version still supported,
implementing a workflow for regression testing that is similar to the one found a
rubocop/rubocop-rails@c9acb7a.
@koic koic force-pushed the add_ci_for_the_oldest_supported_rubocop_version branch from c01dbbb to 50a352c Compare November 24, 2023 04:20
@koic koic merged commit 14ba599 into rubocop:master Nov 25, 2023
11 checks passed
@koic koic deleted the add_ci_for_the_oldest_supported_rubocop_version branch November 25, 2023 15:57
koic added a commit to koic/rubocop-minitest that referenced this pull request Nov 27, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
koic added a commit to koic/rubocop-minitest that referenced this pull request Nov 27, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
koic added a commit to koic/rubocop-minitest that referenced this pull request Nov 27, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
@koic koic mentioned this pull request Nov 27, 2023
8 tasks
koic added a commit to koic/rubocop-minitest that referenced this pull request Nov 27, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
koic added a commit to koic/rubocop-minitest that referenced this pull request Nov 27, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
koic added a commit to koic/rubocop-minitest that referenced this pull request Nov 27, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
koic added a commit to koic/rubocop-minitest that referenced this pull request Nov 28, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
koic added a commit to koic/rubocop-minitest that referenced this pull request Nov 28, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
koic added a commit to koic/rubocop-minitest that referenced this pull request Dec 14, 2023
This PR will centralize CI to GitHub Actions as introduced in
rubocop#275.
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.

1 participant