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

Fix a test failure using Ruby 3.3.0dev #1523

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions spec/faraday_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
end

it 'uses method_missing on Faraday if there is no proxyable method' do
expect { Faraday.this_method_does_not_exist }.to raise_error(
NoMethodError,
"undefined method `this_method_does_not_exist' for Faraday:Module"
)
expected_message = if RUBY_VERSION >= '3.3'
"undefined method `this_method_does_not_exist' for module Faraday"
else
"undefined method `this_method_does_not_exist' for Faraday:Module"
end

expect { Faraday.this_method_does_not_exist }.to raise_error(NoMethodError, expected_message)
end

it 'proxied methods can be accessed' do
Expand Down