Sha256: 534357faf91b32b2e2d85802e260c4562fa75fd4f33478902fcb9ec0c30be6a4

Contents?: true

Size: 548 Bytes

Versions: 4

Compression:

Stored size: 548 Bytes

Contents

require 'test_helper'

class Sidekiq::Benchmark::TestingTest < Minitest::Spec
  require 'sidekiq-benchmark/testing'

  describe 'Testing' do
    before do
      Sidekiq::Benchmark::Test.flush_db
      @worker = Sidekiq::Benchmark::Test::WorkerMock.new
    end

    it "save nothing to redis" do
      Sidekiq.redis do |conn|
        total_time = conn.hget(@worker.benchmark.redis_keys[:total], :job_time)
        _(total_time).must_be_nil
      end
    end

    it "run code in bm blocks" do
      _(@worker.counter).wont_equal 0
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sidekiq-benchmark-0.7.3 test/lib/testing.rb
sidekiq-benchmark-0.7.2 test/lib/testing.rb
sidekiq-benchmark-0.7.1 test/lib/testing.rb
sidekiq-benchmark-0.7.0 test/lib/testing.rb