diff --git a/spec/models/mixins/process_tasks_mixin_spec.rb b/spec/models/mixins/process_tasks_mixin_spec.rb index 4b6e9c0ff33..37bc8cbeb52 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_matching(/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_matching(/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