You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ActiveSupport’s with_option is loaded, and it mistakenly used instead of with_values, the define_enum_for test still passes even for wrong enum value and shows an incorrect message:
Post
validations
is expected to define :status as an enum backed by an integer, prefix: {:draft=>0, :non_existing=>1}
Description
When ActiveSupport’s with_option is loaded, and it mistakenly used instead of with_values, the define_enum_for test still passes even for wrong enum value and shows an incorrect message:
Reproduction Steps
Expected behavior
Raise exception for undefined method
Actual behavior
Returns green spec even with enum checked with wrong value.
System configuration
shoulda_matchers 6.4.0:
rails 7.1.x:
ruby 3.2.x:
The text was updated successfully, but these errors were encountered: