Sha256: e7e1322bb09ae3ac34d302188cffb34e972429d75acfe49e0c8bb48a435d38fe

Contents?: true

Size: 456 Bytes

Versions: 18

Compression:

Stored size: 456 Bytes

Contents

RSpec::Matchers.define :validate_timeliness_of do |attribute|
  match do |model|
    ValidatorDetector.detect(model, attribute, ActiveModel::Validations::TimelinessValidator)
  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

  description do
    "expect #{attribute} to validate timeliness of"
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
riveter-0.8.3 spec/support/validate_timeliness_of_matcher.rb
riveter-0.8.2 spec/support/validate_timeliness_of_matcher.rb
riveter-0.8.1 spec/support/validate_timeliness_of_matcher.rb
riveter-0.8.0 spec/support/validate_timeliness_of_matcher.rb
riveter-0.7.0 spec/support/validate_timeliness_of_matcher.rb
riveter-0.6.0 spec/support/validate_timeliness_of_matcher.rb
riveter-0.3.0 spec/support/validate_timeliness_of_matcher.rb
riveter-0.2.1 spec/support/validate_timeliness_of_matcher.rb
riveter-0.2.0 spec/support/validate_timeliness_of_matcher.rb
riveter-0.1.1 spec/support/validate_timeliness_of_matcher.rb
riveter-0.0.15 spec/support/validate_timeliness_of_matcher.rb
riveter-0.0.14 spec/support/validate_timeliness_of_matcher.rb
riveter-0.0.13 spec/support/validate_timeliness_of_matcher.rb
riveter-0.0.12 spec/support/validate_timeliness_of_matcher.rb
riveter-0.0.11 spec/support/validate_timeliness_of_matcher.rb
riveter-0.0.10 spec/support/validate_timeliness_of_matcher.rb
riveter-0.0.9 spec/support/validate_timeliness_of_matcher.rb
riveter-0.0.8 spec/support/validate_timeliness_of_matcher.rb