Module: StripAttributes::Matchers
- Defined in:
- lib/strip_attributes/matchers.rb
Defined Under Namespace
Classes: StripAttributeMatcher
Instance Method Summary collapse
-
#strip_attribute(attribute) ⇒ Object
Whitespace is stripped from the beginning and end of the attribute.
Instance Method Details
#strip_attribute(attribute) ⇒ Object
Whitespace is stripped from the beginning and end of the attribute
RSpec Examples:
it { is_expected.to strip_attribute(:first_name) }
it { is_expected.not_to strip_attribute(:password) }
Minitest Matchers Examples:
must { strip_attribute :first_name }
wont { strip_attribute :password }
15 16 17 |
# File 'lib/strip_attributes/matchers.rb', line 15 def strip_attribute(attribute) StripAttributeMatcher.new(attribute) end |