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)
192
192
end
193
193
194
194
def skip_signature_verification?
195
+ return true unless defined? ( ::RSpec ::Mocks ) && ( ::RSpec ::Mocks . respond_to? ( :configuration ) )
196
+
195
197
!RSpec ::Mocks . configuration . verify_partial_doubles? ||
196
198
RSpec ::Mocks . configuration . temporarily_suppress_partial_double_verification
197
199
end
Original file line number Diff line number Diff line change @@ -415,6 +415,18 @@ def perform; raise StandardError; end
415
415
}
416
416
end
417
417
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
418
430
end
419
431
420
432
it "passes with provided arguments containing global id object" do
You can’t perform that action at this time.
0 commit comments