Skip to content

Commit c363989

Browse files
author
Tom Johnson
committed
Test Transactable#transaction return w/out block
1 parent 48aa057 commit c363989

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

lib/rdf/spec/transactable.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,17 @@
3939

4040
expect(subject.statements).to contain_exactly(*original_contents)
4141
end
42+
43+
context 'without block given' do
44+
it 'returns a transaction' do
45+
expect(subject.transaction).to be_a RDF::Transaction
46+
end
47+
48+
it 'the returned transaction is live' do
49+
tx = subject.transaction(mutable: true)
50+
tx.insert(RDF::Statement(:s, RDF.type, :o))
51+
expect { tx.execute }.not_to raise_error
52+
end
53+
end
4254
end
4355
end

0 commit comments

Comments
 (0)