Class: Shoulda::Matchers::ActiveModel::RequireAValidCurpMatcher
- Inherits:
-
ValidationMatcher
- Object
- ValidationMatcher
- Shoulda::Matchers::ActiveModel::RequireAValidCurpMatcher
- Defined in:
- lib/validates_curp/require_a_valid_curp_matcher.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
13 14 15 |
# File 'lib/validates_curp/require_a_valid_curp_matcher.rb', line 13 def description 'requires a valid CURP' end |
#failure_message ⇒ Object
17 18 19 |
# File 'lib/validates_curp/require_a_valid_curp_matcher.rb', line 17 def 'does not require a valid CURP' end |
#matches?(subject) ⇒ Boolean
21 22 23 24 |
# File 'lib/validates_curp/require_a_valid_curp_matcher.rb', line 21 def matches?(subject) super(subject) disallows_value_of('123456') && allows_value_of('HEGG560427MVCRRL04') end |