aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorRobert2017-10-02 08:53:18 +0200
committerRobert2017-10-02 10:52:07 +0200
commit30bdfe7c5557ba85f2c6cb18abe4b0308faa217d (patch)
tree2b5c36dced85c09fbfed1bf53a5da827862ee4e6 /spec
parent1bc4ab6684803a3974bd65f6531bd43a57c15fd0 (diff)
downloadchouette-core-30bdfe7c5557ba85f2c6cb18abe4b0308faa217d.tar.bz2
Fixes: #4627@0.55h;
Class Methods replace Class Attributes
Diffstat (limited to 'spec')
-rw-r--r--spec/models/generic_attribute_control/min_max_spec.rb4
-rw-r--r--spec/models/generic_attribute_control/pattern_spec.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/generic_attribute_control/min_max_spec.rb b/spec/models/generic_attribute_control/min_max_spec.rb
index b38032965..d7e1d9a53 100644
--- a/spec/models/generic_attribute_control/min_max_spec.rb
+++ b/spec/models/generic_attribute_control/min_max_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe GenericAttributeControl::MinMax, type: :model do
end
end
context 'are used in instantiation' do
- let( :record ){ create :uniqueness }
+ let( :record ){ create :min_max }
let( :default_att_names ){%w[ code origin_code criticity ]}
it 'all defaults' do
@@ -43,7 +43,7 @@ RSpec.describe GenericAttributeControl::MinMax, type: :model do
expected_values = expected.values_at(*default_att_names)
# Remove key to be tested from atts passed to `#create`
construction_atts = H.first_values(atts).merge(key => nil).compact
- explicit = create :uniqueness, construction_atts
+ explicit = create :min_max, construction_atts
expect( explicit.attributes.values_at(*default_att_names ))
.to eq(expected_values)
diff --git a/spec/models/generic_attribute_control/pattern_spec.rb b/spec/models/generic_attribute_control/pattern_spec.rb
index 646bb735e..294d33c4a 100644
--- a/spec/models/generic_attribute_control/pattern_spec.rb
+++ b/spec/models/generic_attribute_control/pattern_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe GenericAttributeControl::Pattern, type: :model do
end
end
context 'are used in instantiation' do
- let( :record ){ create :uniqueness }
+ let( :record ){ create :pattern }
let( :default_att_names ){%w[ code origin_code criticity ]}
it 'all defaults' do
@@ -43,7 +43,7 @@ RSpec.describe GenericAttributeControl::Pattern, type: :model do
expected_values = expected.values_at(*default_att_names)
# Remove key to be tested from atts passed to `#create`
construction_atts = H.first_values(atts).merge(key => nil).compact
- explicit = create :uniqueness, construction_atts
+ explicit = create :pattern, construction_atts
expect( explicit.attributes.values_at(*default_att_names ))
.to eq(expected_values)