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 fails with ruby 3.3.0dev #105

Open
mtasaka opened this issue Oct 6, 2023 · 0 comments · May be fixed by #106
Open

rspec testsuite fails with ruby 3.3.0dev #105

mtasaka opened this issue Oct 6, 2023 · 0 comments · May be fixed by #106

Comments

@mtasaka
Copy link

mtasaka commented Oct 6, 2023

Testing with ruby 3.3.0dev (I tried: ruby/ruby@8cb906d ), docile git head ( 08cf67d ) rspec testsuite fails like:

$ rspec spec
.....
Failures:

  1) Docile.dsl_eval when DSL have NoMethod error inside raise NoMethodError error from nil
     Failure/Error:
       expect { push_element }.
         to raise_error(
           NoMethodError,
           /undefined method `push' (for|on) nil:NilClass/
         )

       expected NoMethodError with message matching /undefined method `push' (for|on) nil:NilClass/, got #<NoMethodError: undefined method `push' for nil> with backtrace:
         # ./spec/docile_spec.rb:242:in `push_element'
         # ./lib/docile/fallback_context_proxy.rb:93:in `method_missing'
         # ./spec/docile_spec.rb:249:in `block (6 levels) in <top (required)>'
         # ./spec/docile_spec.rb:249:in `block (5 levels) in <top (required)>'
         # ./lib/docile/execution.rb:35:in `instance_exec'
         # ./lib/docile/execution.rb:35:in `exec_in_proxy_context'
         # ./lib/docile.rb:46:in `dsl_eval'
         # ./spec/docile_spec.rb:248:in `block (4 levels) in <top (required)>'
     # ./spec/docile_spec.rb:249:in `block (5 levels) in <top (required)>'
     # ./lib/docile/execution.rb:35:in `instance_exec'
     # ./lib/docile/execution.rb:35:in `exec_in_proxy_context'
     # ./lib/docile.rb:46:in `dsl_eval'
     # ./spec/docile_spec.rb:248:in `block (4 levels) in <top (required)>'

Finished in 0.03959 seconds (files took 0.10392 seconds to load)
45 examples, 1 failure

Failed examples:

rspec ./spec/docile_spec.rb:247 # Docile.dsl_eval when DSL have NoMethod error inside raise NoMethodError error from nil

This is due to :
ruby/ruby#6950
https://bugs.ruby-lang.org/issues/18285

mtasaka added a commit to mtasaka/docile that referenced this issue Oct 6, 2023
ruby 3.3 changes error messages especially for NoMethodError:
ruby/ruby#6950
https://bugs.ruby-lang.org/issues/18285

Modify spec to support this new ruby 3.3 error messages.

Closes ms-ati#105 .
@mtasaka mtasaka linked a pull request Oct 6, 2023 that will close this issue
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.

1 participant