-
Notifications
You must be signed in to change notification settings - Fork 898
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
Conversation
@@ -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_matching(/undefined method `the_task' for/)).and_call_original |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't really use a regex so what about:
expect($log).to receive(:error).with(a_string_matching(/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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with below
Label says 3.2, but the title says 3.3 - do you know which one introduced the change? |
This message is different for ruby 3.3 and 3.1 Change phrase to be the common factor for both ruby versions
325a347
to
076fdf5
Compare
update:
|
Checked commit kbrock@076fdf5 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
This message is different for ruby 3.3 and 3.1
Change phrase to be the common factor for both ruby versions
This is currently the only failure for 3.1/3.3 on master
(besides the gem changes)