Sha256: 9fa33ffcc4e7d8868d7677beadccffd417c51e4d993e1f0534928bf05a94168d

Contents?: true

Size: 783 Bytes

Versions: 32

Compression:

Stored size: 783 Bytes

Contents

##
# Shared context for activities that enumerate their generated entities.
#
# To use, define in your example:
#   - generator_uri [String] URI that corresponds to the ID of your activity
#
shared_context 'provenance queries' do
  let(:query) { double('RDF::Query') }
  let(:solution) { double('RDF::Query::Solution') }
  let(:solution_enum) do
    Enumerator.new do |e|
      e.yield solution
    end
  end
  let(:uri) { double('result uri') }

  before do
    allow(Krikri::ProvenanceQueryClient).to receive(:find_by_activity)
      .with(RDF::URI(generator_uri)).and_return(query)
    allow(query).to receive(:execute).and_return([solution])
    allow(query).to receive(:each_solution).and_return(solution_enum)
    allow(solution).to receive(:record).and_return(uri)
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
krikri-0.11.2 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.11.1 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.11.0 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.10.1 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.10.0 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.9.0 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.9 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.8 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.7 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.6 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.5 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.4 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.3 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.2 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.1 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.8.0 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.7.6 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.7.5 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.7.4 spec/support/shared_contexts/provenance_query_client.rb
krikri-0.7.3 spec/support/shared_contexts/provenance_query_client.rb