Method: Expected::Matchers::HaveAttrWriterMatcher#initialize
- Defined in:
- lib/expected/matchers/have_attr_writer.rb
#initialize(attribute) ⇒ HaveAttrWriterMatcher
Returns a new instance of HaveAttrWriterMatcher.
25 26 27 28 29 30 |
# File 'lib/expected/matchers/have_attr_writer.rb', line 25 def initialize(attribute) unless attribute.is_a?(String) || attribute.is_a?(Symbol) raise 'HaveAttrWriterMatcher attribute must be a String or Symbol' end @attribute = attribute.to_sym end |