Sha256: 5b4e967730a8ee4bd98bf49731c7f732dc94b6d202bbd1e3c662e4313c0af48e

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

require 'test_workers'

describe MultiWorker do
  context "when no other adapter is available" do
    it "defaults to the :inline adapter" do
      MultiWorker.default_adapter.should == :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.1.0 spec/adapters/inline_spec.rb