debian-mirror-gitlab/spec/support/shared_examples/models/cluster_application_core_shared_examples.rb

15 lines
462 B
Ruby
Raw Normal View History

2018-03-27 19:54:05 +05:30
shared_examples 'cluster application core specs' do |application_name|
it { is_expected.to belong_to(:cluster) }
it { is_expected.to validate_presence_of(:cluster) }
describe '#name' do
it 'is .application_name' do
expect(subject.name).to eq(described_class.application_name)
end
it 'is recorded in Clusters::Cluster::APPLICATIONS' do
expect(Clusters::Cluster::APPLICATIONS[subject.name]).to eq(described_class)
end
end
end