spec/support/shared_examples/harvester.rb in krikri-0.1.3 vs spec/support/shared_examples/harvester.rb in krikri-0.2.0
- old
+ new
@@ -1,13 +1,15 @@
shared_examples 'a harvester' do
opts = { uri: 'http://example.org/endpoint' }
- it_behaves_like 'a software agent', opts, Krikri::HarvestJob
+ it_behaves_like 'a software agent', opts
let(:harvester) { subject }
let(:name) { :test_harvester }
+ it { expect(described_class.queue_name.to_s).to eq 'harvest' }
+
it 'is a harvester' do
expect(harvester).to be_a Krikri::Harvester
end
it 'raises an error if no uri is given' do
@@ -118,9 +120,7 @@
harvester.name = name
expect(subject).to have_attributes(:name => name)
end
end
- it_behaves_like 'a software agent',
- { uri: 'http://example.org/endpoint' },
- Krikri::HarvestJob
+ it_behaves_like 'a software agent', uri: 'http://example.org/endpoint'
end