Sha256: d17bd83f78dcceb096ae6e23eb188295e07ce633fc35913e2918cb379f35d41c

Contents?: true

Size: 703 Bytes

Versions: 2

Compression:

Stored size: 703 Bytes

Contents

require 'spec_helper'
require 'sidekiq-apriori/middleware/prioritizer'

describe Sidekiq::Apriori, 'client middleware' do
  before do
    Sidekiq.stub(:server? => false)

    Sidekiq.configure_client do |config|
      config.client_middleware do |chain|
        chain.remove Sidekiq::Apriori::Prioritizer
      end
    end

  end

  it "should include Sidekiq::Apriori::Prioritizer in client middleware" do
    Sidekiq.client_middleware.entries.should be_empty

    (require 'sidekiq-apriori/middleware/client').should be_true

    Sidekiq.client_middleware.entries.should_not be_empty
    Sidekiq.client_middleware.entries.map(&:klass).
      should be_include(Sidekiq::Apriori::Prioritizer)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sidekiq-apriori-0.0.3 spec/sidekiq-apriori/middleware/client_spec.rb
sidekiq-apriori-0.0.2 spec/sidekiq-apriori/middleware/client_spec.rb