lib/rdf/spec/transactable.rb in rdf-spec-3.0.0 vs lib/rdf/spec/transactable.rb in rdf-spec-3.1.0
- old
+ new
@@ -1,11 +1,11 @@
require 'rdf/spec'
RSpec.shared_examples 'an RDF::Transactable' do
include RDF::Spec::Matchers
- let(:statements) { RDF::Spec.quads }
+ let(:statements) { @rdf_transactable_iv_statements = RDF::Spec.quads }
before do
raise '`transactable` must be set with `let(:transactable)`' unless
defined? transactable
end
@@ -32,10 +32,10 @@
original_contents = subject.statements
expect(subject).to receive(:rollback_transaction).and_call_original
expect do
subject.transaction(mutable: true) do
- delete(*@statements)
+ delete(*statements)
raise 'my error'
end
end.to raise_error RuntimeError
expect(subject.statements).to contain_exactly(*original_contents)