module StripAttributes::Matchers
Public Instance Methods
strip_attribute(*attributes)
click to toggle source
Whitespace is stripped from the beginning and end of the attribute
RSpec Examples:
it { is_expected.to strip_attribute(:first_name) } it { is_expected.to strip_attributes(:first_name, :last_name) } it { is_expected.not_to strip_attribute(:password) } it { is_expected.not_to strip_attributes(:password, :encrypted_password) }
Minitest Matchers
Examples:
must { strip_attribute :first_name } must { strip_attributes(:first_name, :last_name) } wont { strip_attribute :password } wont { strip_attributes(:password, :encrypted_password) }
# File lib/strip_attributes/matchers.rb, line 19 def strip_attribute(*attributes) StripAttributeMatcher.new(attributes) end
Also aliased as: strip_attributes