Skip to content

Commit

Permalink
1, Improve the Change Log file for the v1.7.6.
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 1, 2017
1 parent d480502 commit 4ff9802
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@
## v1.7.5
1. As Shop shared examples
2. RSpec shared examples manifest

## v1.7.6
1. As Shopped shared examples
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ def initialize_unidom
include Unidom::Shopping::Concerns::AsShop
end

Unidom::Product::Product.class_eval do
include Unidom::Shopping::Concerns::AsShopped
end

end

# spec/rails_helper.rb
Expand All @@ -148,13 +152,35 @@ initialize_unidom
require 'unidom/shopping/rspec_shared_examples'

# spec/models/unidom/party/shop_spec.rb
describe Unidom::Party::Shop do
describe Unidom::Party::Shop, type: :model do

model_attribtues = {
name: 'WalMart'
}
context do

model_attribtues = {
name: 'WalMart'
}

it_behaves_like 'Unidom::Shopping::Concerns::AsShop', model_attribtues

end

it_behaves_like 'Unidom::Shopping::Concerns::AsShop', model_attribtues
end

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

context do

model_attribtues = {
name: 'Model X',
abbreviation: 'MX',
measurement_unit: 'set',
packing_norm: '1 per 1'
}

it_behaves_like 'Unidom::Shopping::Concerns::AsShopped', model_attribtues

end

end
```

0 comments on commit 4ff9802

Please sign in to comment.