Sha256: a6c35173e4a265c37f758a2c6eba47db8eb1189935f4ba63c20c32842dcc3d2a

Contents?: true

Size: 442 Bytes

Versions: 17

Compression:

Stored size: 442 Bytes

Contents

require 'spec_helper'

require 'toiler/worker'
RSpec.describe Toiler::Worker, type: :model do
  describe "loading class" do
    it "adds the class to the worker registry, under the queue name" do
      class FakeWorker
        include Toiler::Worker
        toiler_options queue: 'test_queue'

        def perform(sqs_message, body); end
      end

      expect(Toiler.worker_class_registry['test_queue']).to eq(FakeWorker)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
toiler-0.7.1 spec/models/worker_spec.rb
toiler-0.7.0 spec/models/worker_spec.rb
toiler-0.6.1 spec/models/worker_spec.rb
toiler-0.6.0 spec/models/worker_spec.rb
toiler-0.6.0.pre1 spec/models/worker_spec.rb
toiler-0.5.1 spec/models/worker_spec.rb
toiler-0.5.1.pre9 spec/models/worker_spec.rb
toiler-0.5.1.pre7 spec/models/worker_spec.rb
toiler-0.5.1.pre6 spec/models/worker_spec.rb
toiler-0.5.1.pre5 spec/models/worker_spec.rb
toiler-0.5.1.pre4 spec/models/worker_spec.rb
toiler-0.5.1.pre3 spec/models/worker_spec.rb
toiler-0.5.1.pre2 spec/models/worker_spec.rb
toiler-0.5.1.pre1 spec/models/worker_spec.rb
toiler-0.5.0 spec/models/worker_spec.rb
toiler-0.4.3 spec/models/worker_spec.rb
toiler-0.4.2 spec/models/worker_spec.rb