Skip to content

Commit

Permalink
1, Improve the Change Log file for the v1.0.5.
Browse files Browse the repository at this point in the history
2, Improve the Read Me file for the source code examples.
  • Loading branch information
topbitdu committed Apr 17, 2017
1 parent 3fbfdfc commit 2e74e0a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@
## v1.0.4
1. As Store shared examples
2. Improve the RSpec shared examples manifest to require the As Store shared examples

## v1.0.5
1. As Stored shared examples
2. Improve the RSpec shared examples manifest to require the As Stored shared examples
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,17 @@ require 'unidom/inventory/validators_rspec'
# lib/unidom.rb
Unidom::Party::Shop.class_eval do

include Unidom::Inventory::Concerns::AsStore

end

Unidom::Product::Product.class_eval do

include Unidom::Inventory::Concerns::AsStored

end


# The Unidom::Inventory::GroupedInventoryItem model & the Unidom::Inventory::SerializedInventoryItem model already include the Unidom::Inventory::Concerns::AsInventoryItem concern
# app/models/your_inventory_item.rb
class YourInventoryItem < ApplicationRecord
Expand All @@ -161,6 +168,13 @@ describe Unidom::Party::Shop, type: :model do

end

# spec/models/unidom/product/product_spec.rb
describe Unidom::Product::Product, type: :model do

it_behaves_like 'Unidom::Inventory::Concerns::AsStored', model_attributes

end

# spec/models/your_inventory_item_spec.rb
describe YourInventoryItem, type: :model do

Expand Down

0 comments on commit 2e74e0a

Please sign in to comment.