From 9f05e97aad33a0cd70862f67101bdcb3fddc639a Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Wed, 13 Mar 2019 13:42:43 +0000 Subject: Run rubocop -a --- spec/support/helpers/graphql_helpers.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'spec/support/helpers/graphql_helpers.rb') diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb index 6cdc19ac2e5..ca28325eab9 100644 --- a/spec/support/helpers/graphql_helpers.rb +++ b/spec/support/helpers/graphql_helpers.rb @@ -18,12 +18,10 @@ module GraphqlHelpers # Runs a block inside a BatchLoader::Executor wrapper def batch(max_queries: nil, &blk) wrapper = proc do - begin - BatchLoader::Executor.ensure_current - yield - ensure - BatchLoader::Executor.clear_current - end + BatchLoader::Executor.ensure_current + yield + ensure + BatchLoader::Executor.clear_current end if max_queries -- cgit v1.2.1