Sha256: 066dcf0b9514710d9e68e20b88f23fec349001724346adeedb858a84442eb1b3
Contents?: true
Size: 936 Bytes
Versions: 24
Compression:
Stored size: 936 Bytes
Contents
# -*- coding: utf-8 -*- require 'spec_helper' describe Krikri::Harvesters::ApiHarvester do it_behaves_like 'a harvester' let(:args) { { uri: 'http://example.org/endpoint' } } subject { described_class.new(args) } shared_context 'with responses' do let(:query_opts) { { :q => 'tags_ssim:dpla' } } let(:response_string) do <<EOM { "response": { "numFound": 467354, "start": 0, "docs": [] } } EOM end before do allow(RestClient).to recieve(:get).with(args[:uri], query_opts) .and_return(response_string) end end describe '#new' do it 'accepts api parameters' do described_class.new() require 'pry' binding.pry end end describe '.expected_opts' do it 'returns a hash with key and options' do end end describe '#count' do it 'returns a count' do expect(subject.count).to eq 100 end end end
Version data entries
24 entries across 24 versions & 1 rubygems