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: Add without_instance_methods qualifier to enum matcher #1636

Conversation

vaot
Copy link
Contributor

@vaot vaot commented Jun 12, 2024

Add a without_instance_methods qualifier to enum matcher.

class Issue < ActiveRecord::Base
  enum status: [:open, :closed], instance_methods: false
end

RSpec.describe Issue, type: :model do
  it do
    should define_enum_for(:status).
      without_instance_methods
  end
end

@vaot vaot requested review from vsppedro and matsales28 as code owners June 12, 2024 18:24
@vaot vaot force-pushed the feat-add-without-instance-methods-qualifier-to-enum branch from 46632ce to bf0c933 Compare June 12, 2024 22:37
@vaot vaot force-pushed the feat-add-without-instance-methods-qualifier-to-enum branch from bf0c933 to 38f79d5 Compare June 12, 2024 23:00
@vaot
Copy link
Contributor Author

vaot commented Jun 17, 2024

Hey @matsales28 👋 , do you have any thoughts on this one ? Thank you.

@matsales28
Copy link
Member

Hey @matsales28 👋 , do you have any thoughts on this one ? Thank you.

Hey @vaot, hope you're doing great. I'm currently on vacation for the next two weeks. Planning on catching up the PRs for shoulda-matchers after that.

Copy link
Member

@matsales28 matsales28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a small suggestion, but overall, it looks good to me!

@matsales28 matsales28 merged commit 121590b into thoughtbot:main Jul 26, 2024
15 checks passed
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.

3 participants