Sha256: 406a33982726780bc05f2712c0be2d38d9be8eccccfe1dca641e316abb44d1f4
Contents?: true
Size: 874 Bytes
Versions: 25
Compression:
Stored size: 874 Bytes
Contents
shared_examples_for 'a relation that returns one tuple' do describe '#one' do it 'returns first tuple' do users_relation.delete(name: 'Joe', email: 'joe@doe.org') expect(relation.one).to eql(name: 'Jane', email: 'jane@doe.org') end it 'raises error when there is more than one tuple' do expect { relation.one }.to raise_error(ROM::TupleCountMismatchError) end end describe '#one!' do it 'returns first tuple' do users_relation.delete(name: 'Joe', email: 'joe@doe.org') expect(relation.one!).to eql(name: 'Jane', email: 'jane@doe.org') end it 'raises error when there is no tuples' do users_relation.delete(name: 'Jane', email: 'jane@doe.org') users_relation.delete(name: 'Joe', email: 'joe@doe.org') expect { relation.one! }.to raise_error(ROM::TupleCountMismatchError) end end end
Version data entries
25 entries across 25 versions & 1 rubygems