Sha256: b7a5413dfb269813a714cdf02e4c0dc25e052ce8e3bc7c55ff2a93030e8720eb
Contents?: true
Size: 999 Bytes
Versions: 17
Compression:
Stored size: 999 Bytes
Contents
require 'spec_helper' require 'sidekiq/testing' Sidekiq::Testing.server_middleware do |chain| chain.add CanvasSync::JobBatches::Compat::Sidekiq::ServerMiddleware end CanvasSync.redis { |r| r.flushdb } def redis_keys CanvasSync.redis { |r| r.keys('BID-*') } end def dump_redis_keys puts redis_keys.inspect end def process_tests out_buf = StringIO.new Sidekiq.logger = Logger.new out_buf # Sidekiq.logger.level = :info Sidekiq::Worker.drain_all output = out_buf.string keys = redis_keys puts out_buf.string [output, keys] end def overall_tests(output, keys, file: nil) test_name = "Batch Integration Test" test_name = File.basename(file, ".*") if file Rspec.describe test_name do it "runs overall complete callback" do expect(output).to include "Overall Complete" end it "runs overall success callback" do expect(output).to include "Overall Success" end it "cleans redis keys" do expect(keys).to eq([]) end end end
Version data entries
17 entries across 17 versions & 1 rubygems