From 577e063e744caa55ffc1049553a7379b1a1896e5 Mon Sep 17 00:00:00 2001 From: Ned Petrov Date: Wed, 1 Jul 2026 21:05:24 +0300 Subject: [PATCH] Fix unit test regexes for Ruby 3.4 Hash#inspect format change Ruby 3.4 changed Hash#inspect to add spaces around => e.g. "key" => "value" instead of "key"=>"value". Update the three log assertion regexes in instance_manager_spec to tolerate optional spaces so they pass on both Ruby 3.3 and 3.4. --- src/bosh_aws_cpi/spec/unit/instance_manager_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bosh_aws_cpi/spec/unit/instance_manager_spec.rb b/src/bosh_aws_cpi/spec/unit/instance_manager_spec.rb index 6839d26d..da35e7ba 100644 --- a/src/bosh_aws_cpi/spec/unit/instance_manager_spec.rb +++ b/src/bosh_aws_cpi/spec/unit/instance_manager_spec.rb @@ -230,15 +230,15 @@ module Bosh::AwsCloud end it '`user_data` when creating an instance' do - expect(logger).to have_received(:info).with(/"user_data"=>""/) + expect(logger).to have_received(:info).with(/"user_data" ?=> ?""/) end it '`defaults.access_key_id` when creating an instance' do - expect(logger).to have_received(:info).with(/"access_key_id"=>""/) + expect(logger).to have_received(:info).with(/"access_key_id" ?=> ?""/) end it '`defaults.secret_access_key` when creating an instance' do - expect(logger).to have_received(:info).with(/"secret_access_key"=>""/) + expect(logger).to have_received(:info).with(/"secret_access_key" ?=> ?""/) end end