Skip to content

Instantly share code, notes, and snippets.

@no-reply
Created December 17, 2014 20:48
Show Gist options
  • Save no-reply/8ee00359eba050a5f10f to your computer and use it in GitHub Desktop.
Save no-reply/8ee00359eba050a5f10f to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe Krikri::HarvestJob do
let(:activity) { create(:krikri_activity) }
describe '#perform' do
before do
allow_any_instance_of(Harvester).to receive(:run).and_return(true)
end
it 'retrieves an activity from the database and runs it' do
Krikri::HarvestJob.perform(activity.id)
activity.reload
assert activity.end_time > activity.start_time
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment