From 076fdf50dd33e835cda1c48fe20554e1abd58cd2 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Fri, 20 Sep 2024 18:27:35 -0400 Subject: [PATCH] spec: Support ruby 3.1 and 3.3 error message formats This message is different for ruby 3.3 and 3.1 Change phrase to be the common factor for both ruby versions --- spec/models/mixins/process_tasks_mixin_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/mixins/process_tasks_mixin_spec.rb b/spec/models/mixins/process_tasks_mixin_spec.rb index 4b6e9c0ff33..7e40b66906e 100644 --- a/spec/models/mixins/process_tasks_mixin_spec.rb +++ b/spec/models/mixins/process_tasks_mixin_spec.rb @@ -257,12 +257,12 @@ def test_method expect(api_collection).to receive(:find).with(0).and_return(Struct.new(:id).new(0)) expect(api_collection).to receive(:find).with(1).and_return(double("Something that responds", :id => 0, :the_task => nil)) - expect($log).to receive(:error).with(a_string_including("undefined method `the_task' for #")).and_call_original + expect($log).to receive(:error).with(a_string_including("undefined method `the_task' for")).and_call_original expect(test_class.invoke_api_tasks(api_connection, :ids => [0, 1], :task => "the_task")).to eq([0, 1]) end it "collection" do - expect($log).to receive(:error).with(a_string_including("undefined method `the_task' for []:Array")).and_call_original + expect($log).to receive(:error).with(a_string_including("undefined method `the_task' for")).and_call_original expect { test_class.invoke_api_tasks(api_connection, :task => "the_task") }.not_to raise_error end end