{"record":{"id":"52b623349b7d72a7","repo":"thoughtbot/shoulda-matchers","slug":"with-options-is-not-a-valid-qualifier-for-the-defi","errorCode":null,"errorMessage":"with_options is not a valid qualifier for the define_enum_for matcher. Did you mean to use with_values instead?","messagePattern":"with_options is not a valid qualifier for the define_enum_for matcher\\. Did you mean to use with_values instead\\?","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"lib/shoulda/matchers/active_record/define_enum_for_matcher.rb","lineNumber":324,"sourceCode":"            description << \", suffix: #{options[:suffix].inspect}\"\n          end\n\n          description\n        end\n\n        def validating(value = true, allowing_nil: false)\n          options[:validating] = value\n          options[:allowing_nil] = allowing_nil\n          self\n        end\n\n        def with_values(expected_enum_values)\n          options[:expected_enum_values] = expected_enum_values\n          self\n        end\n\n        def with_options(**)\n          raise NotImplementedError,\n            'with_options is not a valid qualifier for the define_enum_for matcher. '\\\n            'Did you mean to use with_values instead?'\n        end\n\n        def with_prefix(expected_prefix = true)\n          options[:prefix] = expected_prefix\n          self\n        end\n\n        def with_suffix(expected_suffix = true)\n          options[:suffix] = expected_suffix\n          self\n        end\n\n        def backed_by_column_of_type(expected_column_type)\n          options[:expected_column_type] = expected_column_type\n          self\n        end","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/thoughtbot/shoulda-matchers/blob/79cdfbc326e97c9b43991b644434ca53c1f62c4c/lib/shoulda/matchers/active_record/define_enum_for_matcher.rb#L306-L342","documentation":"Error \"with_options is not a valid qualifier for the define_enum_for matcher. Did you mean to use with_values instead?\" thrown in thoughtbot/shoulda-matchers.","triggerScenarios":"Thrown at lib/shoulda/matchers/active_record/define_enum_for_matcher.rb:324 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"79cdfbc326e97c9b43991b644434ca53c1f62c4c","analyzedAt":"2026-08-23T09:43:24.200Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}