Sha256: 65075ddb62b4c2d0548cd510c7e8baf7f24b500b9dded8512e5a1f3044c8f5fb

Contents?: true

Size: 617 Bytes

Versions: 10

Compression:

Stored size: 617 Bytes

Contents

require "spec_helper"

describe Sidekiq::Merger::Flusher do
  subject { described_class.new(Sidekiq.logger) }

  describe "#call" do
    let(:active_merge) { double(full_merge_key: "active", can_flush?: true, flush: nil) }
    let(:inactive_merge) { double(full_merge_key: "inactive", can_flush?: false, flush: nil) }
    let(:merges) { [active_merge, inactive_merge] }
    it "adds the args to the merge" do
      allow(Sidekiq::Merger::Merge).to receive(:all).and_return merges
      expect(active_merge).to receive(:flush)
      expect(inactive_merge).not_to receive(:flush)

      subject.flush
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sidekiq-merger-0.1.0 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.12 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.11 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.10 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.9 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.8 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.7 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.6 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.5 spec/sidekiq/merger/flusher_spec.rb
sidekiq-merger-0.0.4 spec/sidekiq/merger/flusher_spec.rb