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

feat: support "match" assertions in RSpec/Rails/MinitestAssertions #1783

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Jan 19, 2024

Related to rubocop/rubocop-rspec_rails#7


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Updated documentation.
  • Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

  • Added the new cop to config/default.yml.
  • The cop is configured as Enabled: pending in config/default.yml.
  • The cop is configured as Enabled: true in .rubocop.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.
  • Set VersionAdded: "<<next>>" in default/config.yml.

If you have modified an existing cop's configuration options:

  • Set VersionChanged: "<<next>>" in config/default.yml.

@G-Rath G-Rath requested a review from a team as a code owner January 19, 2024 17:46
@G-Rath
Copy link
Contributor Author

G-Rath commented Jan 19, 2024

I'm not sure why the documentation check is failing - it passes for me locally, and running rake generate_cops_documentation produces no changes:

rubocop-rspec on  support-assert-match via 💎 v2.7.6
❯ bundle exec rake confirm_config documentation_syntax_check confirm_documentation
Files:         139
Modules:        19 (    6 undocumented)
Classes:       143 (    0 undocumented)
Constants:     197 (  196 undocumented)
Attributes:      1 (    0 undocumented)
Methods:       362 (  278 undocumented)
 33.52% documented
* generated /home/jones/workspace/projects-oss/rubocop-rspec/docs/modules/ROOT/pages//cops_rspec.adoc
* generated /home/jones/workspace/projects-oss/rubocop-rspec/docs/modules/ROOT/pages//cops_rspec_capybara.adoc
* generated /home/jones/workspace/projects-oss/rubocop-rspec/docs/modules/ROOT/pages//cops_rspec_factorybot.adoc
* generated /home/jones/workspace/projects-oss/rubocop-rspec/docs/modules/ROOT/pages//cops_rspec_rails.adoc

rubocop-rspec on  support-assert-match via 💎 v2.7.6
❯ bundle exec rake generate_cops_documentation
Files:         139
Modules:        19 (    6 undocumented)
Classes:       143 (    0 undocumented)
Constants:     197 (  196 undocumented)
Attributes:      1 (    0 undocumented)
Methods:       362 (  278 undocumented)
 33.52% documented
* generated /home/jones/workspace/projects-oss/rubocop-rspec/docs/modules/ROOT/pages//cops_rspec.adoc
* generated /home/jones/workspace/projects-oss/rubocop-rspec/docs/modules/ROOT/pages//cops_rspec_capybara.adoc
* generated /home/jones/workspace/projects-oss/rubocop-rspec/docs/modules/ROOT/pages//cops_rspec_factorybot.adoc
* generated /home/jones/workspace/projects-oss/rubocop-rspec/docs/modules/ROOT/pages//cops_rspec_rails.adoc

rubocop-rspec on  support-assert-match via 💎 v2.7.6
❯ git status
On branch support-assert-match
Your branch is up to date with 'origin/support-assert-match'.

nothing to commit, working tree clean

@pirj
Copy link
Member

pirj commented Jan 19, 2024

Maybe add a git diff call with printout before failing doc diff check?

@G-Rath
Copy link
Contributor Author

G-Rath commented Jan 19, 2024

Ah it's because of rubocop/rubocop#12551 and my locally ignored lock - I'll do a dedicated PR for that

I've opened #1785

@pirj
Copy link
Member

pirj commented Jan 19, 2024

We opted not to commit the lockfile

thanks for finding the culprit!

@G-Rath G-Rath force-pushed the support-assert-match branch from 60296b1 to 5b8bac4 Compare January 19, 2024 22:40
@ydah ydah merged commit 8aa251a into rubocop:master Jan 19, 2024
24 checks passed
@G-Rath G-Rath deleted the support-assert-match branch January 21, 2024 17: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.

4 participants