spec/models/entity_spec.rb in maestrano-connector-rails-1.3.3 vs spec/models/entity_spec.rb in maestrano-connector-rails-1.3.4

- old
+ new

@@ -116,17 +116,28 @@ expect(subject.count_entities([*1..27])).to eql(27) end end describe 'public_connec_entity_name' do - it 'returns the connec_entity_name' do + it 'returns the pluralized connec_entity_name' do allow(subject).to receive(:connec_entity_name).and_return('tree') expect(subject.public_connec_entity_name).to eql('trees') end + + context 'when singleton' do + before { + allow(subject).to receive(:singleton?).and_return(true) + } + + it 'returns the connec_entity_name' do + allow(subject).to receive(:connec_entity_name).and_return('tree') + expect(subject.public_connec_entity_name).to eql('tree') + end + end end describe 'public_external_entity_name' do - it 'returns the external_entity_name' do + it 'returns the pluralized external_entity_name' do allow(subject).to receive(:external_entity_name).and_return('tree') expect(subject.public_external_entity_name).to eql('trees') end end end \ No newline at end of file