unidom-standard 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ce749b2adca126906f98ba10785f00a1d53e3d3
|
4
|
+
data.tar.gz: 89625b578ce9172abd9a5e4a35f929a31595060e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d55070efe4ff3987dad3a0b2070aa2d9e3f9537259af8b1b41c81c31c515de9992b416df4ae5c5bb84d5f1a362fd2848de52ef8457ca12e92e5b5ec8c7cfe995
|
7
|
+
data.tar.gz: 1127ec34e5ad090a82a258703654ad20f22440ca51a2d7603c4b170c210b6db3513ae9f9fecedba0846dad2f9e51d200d1e660d86d7bd2e163eb5cf9186b929f
|
@@ -0,0 +1,17 @@
|
|
1
|
+
shared_examples 'Unidom::Standard::Concerns::AsSourceStandard' do |model_attributes|
|
2
|
+
|
3
|
+
context do
|
4
|
+
|
5
|
+
target_associating_1_attributes = {
|
6
|
+
target_id: SecureRandom.uuid
|
7
|
+
}
|
8
|
+
|
9
|
+
target_associating_2_attributes = {
|
10
|
+
target_id: SecureRandom.uuid
|
11
|
+
}
|
12
|
+
|
13
|
+
it_behaves_like 'has_many', model_attributes, :target_associatings, Unidom::Standard::StandardAssociating, [ target_associating_1_attributes, target_associating_2_attributes ]
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'rspec/models/unidom/standard/concerns/as_source_standard_shared_examples'
|
2
|
+
|
1
3
|
describe Unidom::Standard::Standard, type: :model do
|
2
4
|
|
3
5
|
before :each do
|
@@ -19,7 +21,8 @@ describe Unidom::Standard::Standard, type: :model do
|
|
19
21
|
|
20
22
|
number_max_length = described_class.columns_hash['number'].limit
|
21
23
|
|
22
|
-
it_behaves_like 'Unidom::Common::Concerns::ModelExtension',
|
24
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
25
|
+
it_behaves_like 'Unidom::Standard::Concerns::AsSourceStandard', model_attributes
|
23
26
|
|
24
27
|
it_behaves_like 'validates text', model_attributes, :name,
|
25
28
|
length: 2..described_class.columns_hash['name'].limit
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'rspec/models/unidom/standard/concerns/as_source_standard_shared_examples'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-standard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
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-03-
|
11
|
+
date: 2017-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -52,12 +52,14 @@ files:
|
|
52
52
|
- config/routes.rb
|
53
53
|
- db/migrate/20000601000000_create_unidom_standards.rb
|
54
54
|
- db/migrate/20000602000000_create_unidom_standard_associatings.rb
|
55
|
+
- lib/rspec/models/unidom/standard/concerns/as_source_standard_shared_examples.rb
|
55
56
|
- lib/rspec/models/unidom/standard/standard_associating_spec.rb
|
56
57
|
- lib/rspec/models/unidom/standard/standard_spec.rb
|
57
58
|
- lib/tasks/standard_tasks.rake
|
58
59
|
- lib/unidom/standard.rb
|
59
60
|
- lib/unidom/standard/engine.rb
|
60
61
|
- lib/unidom/standard/models_rspec.rb
|
62
|
+
- lib/unidom/standard/rspec_shared_examples.rb
|
61
63
|
- lib/unidom/standard/types_rspec.rb
|
62
64
|
- lib/unidom/standard/validators_rspec.rb
|
63
65
|
- lib/unidom/standard/version.rb
|