diff --git a/spec/lib/gitlab/safe_request_store_spec.rb b/spec/lib/gitlab/safe_request_store_spec.rb
index 27766fa0edac74e984c33e5911d15e48913b8a34..c797171dbe21ba94c2b08f9a771073dce23cab2a 100644
--- a/spec/lib/gitlab/safe_request_store_spec.rb
+++ b/spec/lib/gitlab/safe_request_store_spec.rb
@@ -219,11 +219,11 @@ describe Gitlab::SafeRequestStore do
     end
 
     context 'when RequestStore is NOT active' do
-      around do |example|
+      before do
         RequestStore.write('foo', true)
+      end
 
-        example.run
-
+      after do
         RequestStore.clear! # Clean up
       end