Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions lib/rspec/sidekiq/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require "rubygems"
require "set"

module RSpec
module Sidekiq
Expand All @@ -17,7 +16,6 @@ def initialize
# Functional settings defaults
@clear_all_enqueued_jobs = true
@warn_when_jobs_not_processed_by_sidekiq = true
@silence_warnings = Set.new
end

def sidekiq_gte_7?
Expand All @@ -27,14 +25,6 @@ def sidekiq_gte_7?
def sidekiq_gte_8?
Gem::Version.new(::Sidekiq::VERSION) >= Gem::Version.new("8.0.0")
end

def silence_warning(symbol)
@silence_warnings << symbol
end

def warn_for?(symbol)
!@silence_warnings.include?(symbol)
end
Comment on lines -31 to -37
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it's not being leveraged as of today, it is a public API configuration element (see https://github.com/wspurgin/rspec-sidekiq/wiki/have_enqueued_sidekiq_job-without-argument-default-behavior#silence-warnings)

I left it in to allow future breaking changes to be communicated but silenced if someone wished. I'm not opposed to removing it, but doing so would be a "breaking" change technically (and I think we should release some of the other cleanup and bugfixes first before doing any breaking changes).

end
end
end