Model refactorings and further expansion of specs
commit57a29efea95e57734df9efc14ea929d64e0bcfd6
authorAlex Coles <alexbcoles@mac.com>
Wed, 7 May 2008 07:28:03 +0000 (7 09:28 +0200)
committerAlex Coles <alexbcoles@mac.com>
Wed, 7 May 2008 07:28:03 +0000 (7 09:28 +0200)
tree7227de35787caacdeb32add12b23d59d267c10fc
parentcfec5c5276d1323b1cc6d81f712b9a2dbc547355
Model refactorings and further expansion of specs

* Changed associations (except for many_to_many)
  to use new shorthand syntax, for sake of clarity.
* Changed "validate" reference to "dm-validations"
  to reflect gem renaming in dm-more.
* Added basic specs for most associations.
* Updated some :class_name options for associations
  (still needs to be gone through and tested more
  thoroughly).
* Added missing class and instance methods in
  Mart::AbstractUpload, Mart::Accounts
* Added zipcode, province aliases in Address class
  (and relevant specs)
* Added provinces alias in Country class (and
  relevant specs).
* Added validations into Country class, made name
  property unique.
* Add spec for State class.
* Pushed down image-related properties/constants,
  out of AbstractUpload and into Mart::Image class.
* Add example workaround for current lack of DM
  many-to-many support in Right class.
* Fixed finder ordering syntax in Tag.
* Re-enabled :save callback in User class.
* Made some Mart::Order specs pending, instead of
  letting them fail.
40 files changed:
app/models/address.rb
app/models/country.rb
app/models/mart/abstract_upload.rb
app/models/mart/accounts/abstract_account.rb
app/models/mart/customer.rb
app/models/mart/customers/wishlist_item.rb
app/models/mart/image.rb
app/models/mart/order.rb
app/models/mart/orders/line_item.rb
app/models/mart/orders/status_code.rb
app/models/mart/shipping/type.rb
app/models/mart/shipping/weight.rb
app/models/mart/store/abstract_item.rb
app/models/mart/store/product.rb
app/models/mart/store/product_image.rb
app/models/mart/store/promotion.rb
app/models/mart/store/variation.rb
app/models/right.rb
app/models/state.rb
app/models/tag.rb
app/models/user.rb
spec/models/address_spec.rb
spec/models/country_spec.rb
spec/models/mart/asset_spec.rb
spec/models/mart/customer_spec.rb
spec/models/mart/customers/wishlist_item_spec.rb
spec/models/mart/image_spec.rb
spec/models/mart/order_spec.rb
spec/models/mart/orders/line_item_spec.rb
spec/models/mart/orders/status_code_spec.rb
spec/models/mart/shipping/weight_spec.rb
spec/models/mart/store/abstract_item_spec.rb
spec/models/mart/store/product_image_spec.rb
spec/models/mart/store/product_spec.rb
spec/models/mart/store/promotion_spec.rb
spec/models/mart/store/variation_spec.rb
spec/models/right_spec.rb
spec/models/role_spec.rb
spec/models/state_spec.rb [new file with mode: 0644]
spec/models/tag_spec.rb