Sha256: 3483525e4535fa93330da700fbbd204bb0305665e9f8711bae4adb45743ae743
Contents?: true
Size: 773 Bytes
Versions: 4
Compression:
Stored size: 773 Bytes
Contents
require 'spec_helper' require 'toiler/actor/fetcher' RSpec.describe Toiler::Actor::Fetcher, type: :model do let(:queue) { 'default' } let(:client) { double(:aws_sqs_client) } before do allow_any_instance_of(Toiler::Actor::Fetcher).to receive(:log).and_return(true) allow_any_instance_of(Toiler::Aws::Queue).to receive(:visibility_timeout).and_return(100) allow(client).to receive(:get_queue_url).with(queue_name: 'default').and_return double(:queue, queue_url: 'http://aws.fake/queue') end describe "#new" do it 'completes sucessfully' do fetcher = described_class.new(queue, client) expect(fetcher.polling?).to eq(false) expect(fetcher.executing?).to eq(false) expect(fetcher.scheduled?).to eq(false) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
toiler-0.5.1 | spec/models/fetcher_spec.rb |
toiler-0.5.0 | spec/models/fetcher_spec.rb |
toiler-0.4.3 | spec/models/fetcher_spec.rb |
toiler-0.4.2 | spec/models/fetcher_spec.rb |