DEV: Ensure rspec_current_example_location is actually present before blocking request (#25818)

This commit is contained in:
Selase Krakani 2024-02-22 20:44:15 +00:00 committed by GitHub
parent 10c83a80aa
commit 725561cf4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,7 @@ if Rails.env.test?
(
@@block_requests ||
(
self.class.current_example_location.present? &&
request.cookies[RSPEC_CURRENT_EXAMPLE_COOKIE_STRING].present? &&
self.class.current_example_location !=
request.cookies[RSPEC_CURRENT_EXAMPLE_COOKIE_STRING]
)