Exception: Shoulda::Matchers::ActiveModel::AllowValueMatcher::AttributeDoesNotExistError
- Inherits:
-
Error
- Object
- StandardError
- Error
- Shoulda::Matchers::ActiveModel::AllowValueMatcher::AttributeDoesNotExistError
- Defined in:
- lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
Returns the value of attribute attribute_name.
-
#model ⇒ Object
Returns the value of attribute model.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Methods inherited from Error
Constructor Details
This class inherits a constructor from Shoulda::Matchers::Error
Instance Attribute Details
#attribute_name ⇒ Object
Returns the value of attribute attribute_name.
7 8 9 |
# File 'lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb', line 7 def attribute_name @attribute_name end |
#model ⇒ Object
Returns the value of attribute model.
7 8 9 |
# File 'lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb', line 7 def model @model end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb', line 7 def value @value end |
Instance Method Details
#message ⇒ Object
9 10 11 12 13 14 |
# File 'lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb', line 9 def Shoulda::Matchers.word_wrap <<-MESSAGE The matcher attempted to set :#{attribute_name} on the #{model.name} to #{value.inspect}, but that attribute does not exist. MESSAGE end |
#successful? ⇒ Boolean
16 17 18 |
# File 'lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb', line 16 def successful? false end |