Method: Assert::Macros::Methods::ClassMethods#have_accessor

Defined in:
lib/assert/macros/methods.rb

#have_accessor(*methods) ⇒ Object Also known as: have_accessors



100
101
102
103
104
105
# File 'lib/assert/macros/methods.rb', line 100

def have_accessor(*methods)
  called = methods.last.kind_of?(Array) ? methods.pop : caller
  accessor_meths = methods.collect{|m| [m, "#{m}="]}.flatten
  accessor_meths << called
  have_instance_methods(*accessor_meths)
end