Sha256: a6c59b078a042a6379b3a04664428dd5faadddfe6983b7f9b55d0e4a91f71e25

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

require 'test_workers'

describe MultiWorker do
  context "when no other adapter is available" do
    it "defaults to the :inline adapter" do
      expect(MultiWorker.default_adapter).to eq(:inline)
    end
  end

  context "when using the :inline adapter" do
    it "performs the work immediately" do
      expect(TestWorker).to receive(:perform).exactly(3).times.with("foo")
      TestWorker.perform_async("foo")
      MultiWorker.enqueue(TestWorker, "foo")
      TestWorker.perform("foo")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
multi_worker-0.2.0 spec/adapters/inline_spec.rb