Sha256: 9374858e4f036d51c18af6d8a9b7f52bbd652784668975eef31e5387b58765be

Contents?: true

Size: 470 Bytes

Versions: 1

Compression:

Stored size: 470 Bytes

Contents

shared_examples_for "a worker" do
  context "class" do
    subject { described_class }

    it { should respond_to(:perform) }
    it { should respond_to(:perform_async) }

    it "delegates ::perform to #perform" do
      TestWorker.any_instance.should_receive(:perform).once.with("foo")
      TestWorker.perform("foo")
    end
  end

  context "instance" do
    it { should respond_to(:perform) }
    it { should respond_to(:perform_async) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
multi_worker-0.1.0 spec/shared/worker_spec.rb