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

rspec testsuite error with ruby3.4.0dev #1602

Closed
mtasaka opened this issue Dec 1, 2024 · 3 comments · Fixed by #1604
Closed

rspec testsuite error with ruby3.4.0dev #1602

mtasaka opened this issue Dec 1, 2024 · 3 comments · Fixed by #1604

Comments

@mtasaka
Copy link
Contributor

mtasaka commented Dec 1, 2024

Testing with ruby 3.4.0dev (2024-12-01 master 96fac34797) +PRISM [x86_64-linux]
ruby/ruby@96fac34

faraday git head
f9f4ce5
causes rspec testsuite failure like below.

$ bundle exec rake

Failures:

  1) Faraday::Error.initialize with response hash is expected to eq "#<Faraday::Error response={:status=>400}>"
     Failure/Error: it { expect(subject.inspect).to eq('#<Faraday::Error response={:status=>400}>') }
     
       expected: "#<Faraday::Error response={:status=>400}>"
            got: "#<Faraday::Error response={status: 400}>"
     
       (compared using ==)
     # ./spec/faraday/error_spec.rb:27:in 'block (4 levels) in <top (required)>'
     # /builddir/.local/share/gem/ruby/gems/webmock-3.24.0/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'

  2) Faraday::Error.initialize with exception string and response hash is expected to eq "#<Faraday::Error response={:status=>400}>"
     Failure/Error: it { expect(subject.inspect).to eq('#<Faraday::Error response={:status=>400}>') }
     
       expected: "#<Faraday::Error response={:status=>400}>"
            got: "#<Faraday::Error response={status: 400}>"
     
       (compared using ==)
     # ./spec/faraday/error_spec.rb:64:in 'block (4 levels) in <top (required)>'
     # /builddir/.local/share/gem/ruby/gems/webmock-3.24.0/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'

Finished in 2.01 seconds (files took 0.8455 seconds to load)
593 examples, 2 failures

Failed examples:

rspec ./spec/faraday/error_spec.rb:27 # Faraday::Error.initialize with response hash is expected to eq "#<Faraday::Error response={:status=>400}>"
rspec ./spec/faraday/error_spec.rb:64 # Faraday::Error.initialize with exception string and response hash is expected to eq "#<Faraday::Error response={:status=>400}>"
@olleolleolle
Copy link
Member

@mtasaka Thanks for the report! Would you like to make a PR with a conditional step in the test suite, checking differently for Ruby 3.4+?

@iMacTia
Copy link
Member

iMacTia commented Dec 2, 2024

Or bonus points if we can change the test so that it doesn't rely on inspect and works with all Ruby versions 😄

mtasaka added a commit to mtasaka/faraday that referenced this issue Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants