unidom-standard 1.4.6 → 1.4.7
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: c4ab89fdbec6549a33676cb976331004d2d82b15
|
4
|
+
data.tar.gz: 73d0e889a61027e8782ee8a08c53af62ec1adec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7903c4b78ae5b28c2369f6549f7cff557fa6c9a5d725c2f14d9d51ac80eb9681c13530c03cb229a00dc43f3fd055dcca36a352976659d1ea03988927943574b
|
7
|
+
data.tar.gz: 7695693980fe07166e88115b3b590fedadac9bd681237896ec71dd0856ab476cdc6ab2c40f1f1aa36ac7137986a97d945dabf7804e82f42418ee0f5dc9bce5e5
|
@@ -0,0 +1,17 @@
|
|
1
|
+
shared_examples 'Unidom::Standard::Concerns::AsTargetStandard' do |model_attributes|
|
2
|
+
|
3
|
+
context do
|
4
|
+
|
5
|
+
source_associating_1_attributes = {
|
6
|
+
source_id: SecureRandom.uuid
|
7
|
+
}
|
8
|
+
|
9
|
+
source_associating_2_attributes = {
|
10
|
+
source_id: SecureRandom.uuid
|
11
|
+
}
|
12
|
+
|
13
|
+
it_behaves_like 'has_many', model_attributes, :source_associatings, Unidom::Standard::StandardAssociating, [ source_associating_1_attributes, source_associating_2_attributes ]
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rspec/models/unidom/standard/concerns/as_source_standard_shared_examples'
|
2
|
+
require 'rspec/models/unidom/standard/concerns/as_target_standard_shared_examples'
|
2
3
|
|
3
4
|
describe Unidom::Standard::Standard, type: :model do
|
4
5
|
|
@@ -19,14 +20,14 @@ describe Unidom::Standard::Standard, type: :model do
|
|
19
20
|
obsoleted_on: Date.current+20.years
|
20
21
|
}
|
21
22
|
|
22
|
-
number_max_length = described_class.columns_hash['number'].limit
|
23
|
-
|
24
23
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
25
24
|
it_behaves_like 'Unidom::Standard::Concerns::AsSourceStandard', model_attributes
|
25
|
+
it_behaves_like 'Unidom::Standard::Concerns::AsTargetStandard', model_attributes
|
26
26
|
|
27
27
|
it_behaves_like 'validates text', model_attributes, :name,
|
28
28
|
length: 2..described_class.columns_hash['name'].limit
|
29
29
|
|
30
|
+
number_max_length = described_class.columns_hash['number'].limit
|
30
31
|
it_behaves_like 'validates', model_attributes, :number,
|
31
32
|
{ } => 0,
|
32
33
|
{ number: nil } => 2,
|
@@ -1 +0,0 @@
|
|
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.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-
|
11
|
+
date: 2017-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- db/migrate/20000601000000_create_unidom_standards.rb
|
54
54
|
- db/migrate/20000602000000_create_unidom_standard_associatings.rb
|
55
55
|
- lib/rspec/models/unidom/standard/concerns/as_source_standard_shared_examples.rb
|
56
|
+
- lib/rspec/models/unidom/standard/concerns/as_target_standard_shared_examples.rb
|
56
57
|
- lib/rspec/models/unidom/standard/standard_associating_spec.rb
|
57
58
|
- lib/rspec/models/unidom/standard/standard_spec.rb
|
58
59
|
- lib/tasks/standard_tasks.rake
|