Sha256: 36a21eab1ea146bfc6581d0efadf9e0e317572b05dc0fa1b02ce0401f1dc8142
Contents?: true
Size: 517 Bytes
Versions: 15
Compression:
Stored size: 517 Bytes
Contents
# frozen_string_literal: true RSpec::Matchers.define :validate_timeliness_of do |attribute| match do |model| model._validators[attribute.to_sym].detect do |validator| validator.instance_of?(ActiveModel::Validations::TimelinessValidator) && validator.attributes.include?(attribute) end end failure_message do |_actual| "expect #{attribute} to validate timeliness of" end failure_message_when_negated do |_actual| "expect #{attribute} to not validate timeliness of" end end
Version data entries
15 entries across 15 versions & 1 rubygems