unidom-shopping 1.6.5 → 1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -0
- data/lib/rspec/models/unidom/shopping/shopping_cart_spec.rb +22 -0
- data/lib/rspec/models/unidom/shopping/shopping_item_spec.rb +25 -0
- data/lib/unidom/shopping/models_rspec.rb +2 -0
- data/lib/unidom/shopping/types_rspec.rb +0 -0
- data/lib/unidom/shopping/validators_rspec.rb +0 -0
- data/lib/unidom/shopping/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e8e14b74e51a3edff59645c7cd4fdd9a1b0b8cc
|
4
|
+
data.tar.gz: 751664ebede505d722e06fe4fd6e7b81658a8f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d9360220a5d50112372e7fcd5dd6caaa5e398952a5e518bd78e7ead0374d5f5fbda3b790e7aab55d264c63118be2e6bc3ca1b592c23fe1c6f83c2c137743f2e
|
7
|
+
data.tar.gz: 5f3c7516951c3397ab661525c8ca491e0596908a676a7fdfbac16d0ea783d930558108bdbd3d3c568f7bf2eccc11a4e432e44b7905f6c664bbbe7d2421e72ebc
|
data/README.md
CHANGED
@@ -110,3 +110,18 @@ Unidom::Common.configure do |options|
|
|
110
110
|
|
111
111
|
end
|
112
112
|
```
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
## RSpec examples
|
117
|
+
|
118
|
+
```ruby
|
119
|
+
# spec/models/unidom_spec.rb
|
120
|
+
require 'unidom/shopping/models_rspec'
|
121
|
+
|
122
|
+
# spec/types/unidom_spec.rb
|
123
|
+
require 'unidom/shopping/types_rspec'
|
124
|
+
|
125
|
+
# spec/validators/unidom_spec.rb
|
126
|
+
require 'unidom/shopping/validators_rspec'
|
127
|
+
```
|
@@ -0,0 +1,22 @@
|
|
1
|
+
describe Unidom::Shopping::ShoppingCart, type: :model do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
model_attributes = {
|
12
|
+
shopper_id: SecureRandom.uuid,
|
13
|
+
shopper_type: 'Unidom::Shopping::Shopper',
|
14
|
+
shop_id: SecureRandom.uuid,
|
15
|
+
shop_type: 'Unidom::Shopping::Shop'
|
16
|
+
}
|
17
|
+
|
18
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
describe Unidom::Shopping::ShoppingItem, type: :model do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
model_attributes = {
|
12
|
+
shopping_cart_id: SecureRandom.uuid,
|
13
|
+
shopper_id: SecureRandom.uuid,
|
14
|
+
shopper_type: 'Unidom::Shopping::Shopper',
|
15
|
+
shopped_id: SecureRandom.uuid,
|
16
|
+
shopped_type: 'Unidom::Shopping::Shopped',
|
17
|
+
unit_price: 12.00,
|
18
|
+
quantity: 5.00
|
19
|
+
}
|
20
|
+
|
21
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,2 @@
|
|
1
|
+
require 'rspec/models/unidom/shopping/shopping_cart_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Shopping::ShoppingCart'
|
2
|
+
require 'rspec/models/unidom/shopping/shopping_item_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Shopping::ShoppingItem'
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-shopping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.7'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -54,9 +54,14 @@ files:
|
|
54
54
|
- config/routes.rb
|
55
55
|
- db/migrate/20020501000000_create_unidom_shopping_carts.rb
|
56
56
|
- db/migrate/20020502000000_create_unidom_shopping_items.rb
|
57
|
+
- lib/rspec/models/unidom/shopping/shopping_cart_spec.rb
|
58
|
+
- lib/rspec/models/unidom/shopping/shopping_item_spec.rb
|
57
59
|
- lib/tasks/shopping_tasks.rake
|
58
60
|
- lib/unidom/shopping.rb
|
59
61
|
- lib/unidom/shopping/engine.rb
|
62
|
+
- lib/unidom/shopping/models_rspec.rb
|
63
|
+
- lib/unidom/shopping/types_rspec.rb
|
64
|
+
- lib/unidom/shopping/validators_rspec.rb
|
60
65
|
- lib/unidom/shopping/version.rb
|
61
66
|
homepage: https://github.com/topbitdu/unidom-shopping
|
62
67
|
licenses:
|