Skip to content

Commit

Permalink
Merge pull request #23203 from kbrock/flexible_error_matcher_ruby31
Browse files Browse the repository at this point in the history
spec: Support ruby 3.1 and 3.3 error message formats
  • Loading branch information
Fryguy committed Sep 25, 2024
2 parents a22f04f + 076fdf5 commit 3149343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/models/mixins/process_tasks_mixin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 #<struct id=0>")).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
Expand Down

0 comments on commit 3149343

Please sign in to comment.