Skip to content

Commit cf5f3f8

Browse files
committed
Check if RSpec::Mocks is defined in #skip_signature_verification?
Trying to respect this comment relating to requiring less of RSpec mocks: https://github.com/rspec/rspec-rails/blob/1ba134da2c8a48c3e4a26d6bb9104ef33d91781f/lib/rspec/rails/matchers/have_enqueued_mail.rb#L1-L3
1 parent 67a538f commit cf5f3f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/rspec/rails/matchers/active_job.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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)
196+
195197
!RSpec::Mocks.configuration.verify_partial_doubles? ||
196198
RSpec::Mocks.configuration.temporarily_suppress_partial_double_verification
197199
end

0 commit comments

Comments
 (0)