test/lib/vedeu/support/repository_test.rb in vedeu-0.2.9 vs test/lib/vedeu/support/repository_test.rb in vedeu-0.2.10
- old
+ new
@@ -40,16 +40,21 @@
end
end
describe '#find' do
it 'raises an exception when the entity cannot be found' do
- proc { RepositoryTestClass.new.find('terbium') }
- .must_raise(EntityNotFound)
+ proc {
+ RepositoryTestClass.new.find('terbium')
+ }.must_raise(EntityNotFound)
end
context 'when the entity is found' do
it 'returns the stored entity' do
- skip
+ entity = { key: :value }
+ repo = RepositoryTestClass.new
+ repo.add({ 'terbium' => entity })
+
+ repo.find('terbium').must_equal(entity)
end
end
end
describe '#find_or_create' do