From 725561cf4bddeda0a5cf2f68ed7b76e0c9deead8 Mon Sep 17 00:00:00 2001 From: Selase Krakani <849886+s3lase@users.noreply.github.com> Date: Thu, 22 Feb 2024 20:44:15 +0000 Subject: [PATCH] DEV: Ensure `rspec_current_example_location` is actually present before blocking request (#25818) --- config/initializers/200-first_middlewares.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/200-first_middlewares.rb b/config/initializers/200-first_middlewares.rb index 618a083dedb..e06b7b9f3d1 100644 --- a/config/initializers/200-first_middlewares.rb +++ b/config/initializers/200-first_middlewares.rb @@ -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] )