Module: ActiveAttr::Matchers
- Defined in:
- lib/active_attr/matchers.rb,
lib/active_attr/matchers/have_attribute_matcher.rb
Overview
Matchers that can be used with RSpec and Shoulda to declaritively verify models based on ActiveAttr modules
Defined Under Namespace
Classes: HaveAttributeMatcher
Instance Method Summary collapse
-
#have_attribute(attribute_name) ⇒ ActiveAttr::HaveAttributeMatcher
Specify that a model should have an attribute matching the criteria.
Instance Method Details
#have_attribute(attribute_name) ⇒ ActiveAttr::HaveAttributeMatcher
Specify that a model should have an attribute matching the criteria. See HaveAttributeMatcher
18 19 20 |
# File 'lib/active_attr/matchers/have_attribute_matcher.rb', line 18 def have_attribute(attribute_name) HaveAttributeMatcher.new(attribute_name) end |