diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -61,9 +61,9 @@ module SpecHelpers
     "#{RUN_ID}-topic-#{SecureRandom.uuid}"
   end
 
-  def create_random_topic(*args)
+  def create_random_topic(**args)
     topic = generate_topic_name
-    create_topic(topic, *args)
+    create_topic(topic, **args)
     topic
   end
 
diff --git a/spec/transaction_manager_spec.rb b/spec/transaction_manager_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/transaction_manager_spec.rb
+++ b/spec/transaction_manager_spec.rb
@@ -591,10 +591,10 @@ describe ::Kafka::TransactionManager do
           )
         )
         allow(group_coordinator).to receive(:txn_offset_commit).and_return(
-          txn_offset_commit_response(
+          txn_offset_commit_response({
             'hello' => [1],
             'world' => [2]
-          )
+          })
         )
       end
Resolve "Passing the keyword argument as ..." deprecation warning