thoughtbot / shoulda-matchers

Simple one-liner tests for common Rails functionality
https://matchers.shoulda.io
MIT License
3.5k stars 911 forks source link

feat: Add without_instance_methods qualifier to enum matcher #1636

Closed vaot closed 1 month ago

vaot commented 2 months ago

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 commented 2 months ago

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

matsales28 commented 2 months ago

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.