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: 5074514288d7f7655f4bdf71d446d7651a5c6c3c
4
- data.tar.gz: 03d1026e9ce1c8574571880a7e650656e62e7c4d
3
+ metadata.gz: 6ce749b2adca126906f98ba10785f00a1d53e3d3
4
+ data.tar.gz: 89625b578ce9172abd9a5e4a35f929a31595060e
5
5
  SHA512:
6
- metadata.gz: d80cfb1d161f77a2bab7d05a3cd37d05ea7ec44be51e959f938d458f71f695beddeb464465f7737e415b4e7560d0cd1d35d01d94f02ac3cc97a4b67b01af2189
7
- data.tar.gz: 9d8f7a5ef06b8971633d01476b3168240ab88e136ccec71d37b12cf036bb85db736af9928e77954ae3e0cba36047cb2459d65ce4f6732e5bd7ee351bdaca25fc
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', model_attributes
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'
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Standard
3
- VERSION = '1.4.5'.freeze
3
+ VERSION = '1.4.6'.freeze
4
4
  end
5
5
  end
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.5
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-20 00:00:00.000000000 Z
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