Class: Mongoid::Matchers::Validations::ValidateAssociated

Inherits:
HaveValidationMatcher show all
Defined in:
lib/matchers/validations/associated.rb

Instance Method Summary collapse

Methods inherited from HaveValidationMatcher

#failure_message, #matches?, #negative_failure_message, #on, #with_message

Methods inherited from Matcher

#failure_message, #negative_failure_message

Methods included from Helpers

#class_of, #to_sentence

Constructor Details

#initialize(association_name) ⇒ ValidateAssociated

Returns a new instance of ValidateAssociated.



5
6
7
# File 'lib/matchers/validations/associated.rb', line 5

def initialize(association_name)
  super(association_name, :associated)
end

Instance Method Details

#descriptionObject



9
10
11
# File 'lib/matchers/validations/associated.rb', line 9

def description
  "validate associated #{@field.inspect}"
end