Skip to content

Commit ecd8937

Browse files
author
Tom Johnson
committed
Check correct requirement for transactional insert
Inserting a statement should ensure that the statement exist after the transaction; not that the target contains *exactly* that statement.
1 parent 49ee769 commit ecd8937

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/rdf/spec/repository.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,10 @@
5050
it 'commits a successful transaction' do
5151
statement = RDF::Statement(:s, RDF.type, :o)
5252
expect(subject).to receive(:commit_transaction).and_call_original
53-
53+
5454
expect do
55-
subject.transaction(mutable: true) do
56-
insert(statement)
57-
end
58-
end.to change { subject.statements }.to contain_exactly(statement)
55+
subject.transaction(mutable: true) { insert(statement) }
56+
end.to change { subject.statements }.to include(statement)
5957
end
6058

6159
it 'rolls back a failed transaction' do

0 commit comments

Comments
 (0)