Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: Support ruby 3.1 and 3.3 error message formats #23203

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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