From dcadb5e738774a133f980cd07ba2d617c6d6656d Mon Sep 17 00:00:00 2001 From: Szymon Szukalski Date: Fri, 25 Oct 2024 13:32:15 +1100 Subject: Handle singular form of SIBLINGS action. - Updated tests to handle `SIBLING` action - Added assumptions to README --- spec/family_tree_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/family_tree_spec.rb b/spec/family_tree_spec.rb index dcff803..0d7c101 100644 --- a/spec/family_tree_spec.rb +++ b/spec/family_tree_spec.rb @@ -67,10 +67,12 @@ RSpec.describe FamilyTree do context 'finding siblings' do it 'returns sibling\'s name if present' do - expect(FamilyTree.instance.get_relationship('Draco', 'siblings')).to eq('Aster') + expect(FamilyTree.instance.get_relationship('Draco', 'sibling')).to eq('Aster') + expect(FamilyTree.instance.get_relationship('Draco', 'sibling')).to eq('Aster') end it 'returns NONE if there are no siblings' do + expect(FamilyTree.instance.get_relationship('Remus', 'sibling')).to eq('NONE') expect(FamilyTree.instance.get_relationship('Remus', 'siblings')).to eq('NONE') end end -- cgit v1.2.3