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

Can't match rspec errors in 9.4.2.0 #7761

Closed
jcoyne opened this issue Apr 20, 2023 · 5 comments
Closed

Can't match rspec errors in 9.4.2.0 #7761

jcoyne opened this issue Apr 20, 2023 · 5 comments
Milestone

Comments

@jcoyne
Copy link

jcoyne commented Apr 20, 2023

In MRI 3.1, I'm able to run this rspec test where it has an implied error type of RuntimeError, however in jRuby I have to be explicit about the error type or I receive the following error:

     Failure/Error: expect { request }.to raise_error 'Verboten!'

       expected Exception with "Verboten!", got #<TypeError: exception class/object expected> with backtrace:

Similar to #7112

Using rspec 3.12.0

The code for this matcher is here

@enebo enebo added this to the JRuby 9.4.3.0 milestone Apr 20, 2023
@enebo
Copy link
Member

enebo commented Apr 20, 2023

I am not seeing this locally but perhaps my attempts at making a repro is wrong OR dependent gems of rspec differ?

def request
  raise RuntimeError.new 'Verboten!'
end

context "A" do
  it "should" do
    expect { request }.to raise_error 'Verboten!'
  end
end
~/releases/9.4.2.0/jruby-9.4.2.0/bin/jruby -S rspec ../snippets/err.rb 
.

Finished in 0.05344 seconds (files took 0.33124 seconds to load)
1 example, 0 failures
rspec (3.12.0)
rspec-core (3.12.2)
rspec-expectations (3.12.3)
rspec-mocks (3.12.5)
rspec-support (3.12.0)

@enebo
Copy link
Member

enebo commented Apr 20, 2023

@jcoyne Looking at #7112 it appears that was caused due to an underlying bug with prepend. So I am guessing my repro is not doing something your code is (prepend refinements).

@jcoyne
Copy link
Author

jcoyne commented Apr 20, 2023

Hmm.... for some reason I can't duplicate this on my local machine either 😠 it's only in CI: https://github.com/sul-dlss/searchworks_traject_indexer/actions/runs/4750303631/jobs/8438358385

@jcoyne jcoyne closed this as completed Apr 20, 2023
@enebo
Copy link
Member

enebo commented Apr 20, 2023

@jcoyne Is it possible something extra is loaded as part of the CI job? I also tried with --dev and compiled so I don't think that would differ.

@jcoyne
Copy link
Author

jcoyne commented Apr 20, 2023

No, I don't think it's loading any loading differently.

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

No branches or pull requests

2 participants