diff options
| author | Szymon Szukalski <szymon@skas.io> | 2024-10-25 13:32:15 +1100 |
|---|---|---|
| committer | Szymon Szukalski <szymon@skas.io> | 2024-10-25 13:32:15 +1100 |
| commit | dcadb5e738774a133f980cd07ba2d617c6d6656d (patch) | |
| tree | 319dc95bfc5c62f3c995294d9e1e97cc13bcf89a /spec | |
| parent | 5fe552de8f8e8f7bd4747d75a2a1da92e67bdc4a (diff) | |
Handle singular form of SIBLINGS action.
- Updated tests to handle `SIBLING` action
- Added assumptions to README
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/family_tree_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
