File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
spec/rspec/rails/matchers Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,8 @@ def detect_args_signature_mismatch(jobs)
192192 end
193193
194194 def skip_signature_verification?
195+ return true unless defined? ( ::RSpec ::Mocks ) && ( ::RSpec ::Mocks . respond_to? ( :configuration ) )
196+
195197 !RSpec ::Mocks . configuration . verify_partial_doubles? ||
196198 RSpec ::Mocks . configuration . temporarily_suppress_partial_double_verification
197199 end
Original file line number Diff line number Diff line change @@ -415,6 +415,18 @@ def perform; raise StandardError; end
415415 }
416416 end
417417 end
418+
419+ context "without rspec-mocks loaded" do
420+ before do
421+ # Its hard for us to unload this, but its fairly safe to assume that we can run
422+ # a defined? check, this just mocks the "short circuit"
423+ allow ( ::RSpec ::Mocks ) . to receive ( :respond_to? ) . with ( :configuration ) { false }
424+ end
425+
426+ it "skips signature checks" do
427+ expect { two_args_job . perform_later ( 1 ) } . to have_enqueued_job . with ( 1 )
428+ end
429+ end
418430 end
419431
420432 it "passes with provided arguments containing global id object" do
You can’t perform that action at this time.
0 commit comments