On this commit we add a new qualifier to the define_enum_for matcher called validating. This qualifier is used to test if the enum is being validated or not.
class Issue < ActiveRecord::Base
enum status: [:open, :closed], validate: true
end
RSpec.describe Issue, type: :model do
it do
should define_enum_for(:status).
validating
end
end
On this commit we add a new qualifier to the
define_enum_for
matcher calledvalidating
. This qualifier is used to test if the enum is being validated or not.