Permalink
Browse files

Modified test data to conform to desired convention-based API. Many n…

…ew test failures. ;-)
  • Loading branch information...
1 parent 115cd28 commit 84aecb60971aecafcf3ff527b38cdfcc5a04d9f1 Evan Light committed Mar 15, 2013
Showing with 3 additions and 13 deletions.
  1. +3 −13 spec/test_data.rb
View
@@ -46,29 +46,19 @@ class ItemData < ActiveRecord::Base
# STEP2: Define domain objects
# --------------------------------------------------
class Order
- include Edr::Model
-
- fields :id, :amount, :deliver_at
- wrap_associations :items
-
- def add_item attrs
- repository.create_item self, attrs
- end
end
class Item
- include Edr::Model
-
- fields :id, :name, :amount, :order_id
end
# STEP3: map data objects to domain objects
# --------------------------------------------------
Edr::Registry.define do
- map Order, OrderData
- map Item, ItemData
+# NOTE: Below should be implicit by naming convention
+# map Order, OrderData
+# map Item, ItemData
end

0 comments on commit 84aecb6

Please sign in to comment.