Module: Resourceful::Shoulda::TestUnit

Defined in:
lib/resourceful/shoulda/test_unit.rb

Instance Method Summary collapse

Instance Method Details

#should_have_resourceful_attribute(name, opts = {}) ⇒ Object



12
13
14
15
16
# File 'lib/resourceful/shoulda/test_unit.rb', line 12

def should_have_resourceful_attribute(name, opts={})
  clean_name = ::Resourceful::Model::Base.cleanup_name(name)
  should_have_instance_methods clean_name, "#{clean_name}=", "_#{clean_name}"
  should_have_resourceful_typed_attribute(name, opts[:type])
end