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 ruby3.4.0dev #1488

Open
mtasaka opened this issue Nov 7, 2024 · 1 comment
Open

rspec testsuite fails with ruby3.4.0dev #1488

mtasaka opened this issue Nov 7, 2024 · 1 comment

Comments

@mtasaka
Copy link

mtasaka commented Nov 7, 2024

Trying with ruby 3.4.0dev (2024-11-07 master 048bb1e176) +PRISM [x86_64-linux]
ruby/ruby@048bb1e

rspec test suite for rspec-expectations 3.13.3 : 838952d fails so may like attached.
failure.log.txt

Looks like rspec-expectations also needs supporting ruby3.4 formatting change.

@mtasaka
Copy link
Author

mtasaka commented Nov 7, 2024

The full failure log is attached above. The log contains like:

Failures:
  1) expect { ... }.not_to change { block } with a deeply nested object graph fails when part of it is changed
     Failure/Error:
       expect {
         expect { data[0][:a] << 3 }.not_to change { data }
       }.to fail_with(failure_msg)
       expected RSpec::Expectations::ExpectationNotMetError with message matching /expected (?-mix:result|`.+?`) not to have changed, but did change from \[\{a:\ \[1,\ 2\]\}\] to \[\{a:\ \[1,\ 2,\ 3\]\}\]/, got #<RSpec::Expectations::ExpectationNotMetError: expected `data` not to have changed, but did change from [{:a => [1, 2]}] to [{:a => [1, 2, 3]}]> with backtrace:
         # ./spec/rspec/matchers/built_in/change_spec.rb:464:in 'block (4 levels) in <top (required)>'
         # ./spec/rspec/matchers/built_in/change_spec.rb:465:in 'block (3 levels) in <top (required)>'
     # ./spec/rspec/matchers/built_in/change_spec.rb:465:in 'block (3 levels) in <top (required)>'
  2) #have_attributes matcher expect(...).to_not have_attributes(with_one_attribute) fails if target has all of the expected attributes
     Failure/Error:
       expect {
         expect(person).to_not have_attributes(:age => correct_age)
       }.to fail_with(%r|expected #{object_inspect person} not to have attributes #{hash_inspect :age => correct_age}|)
       expected RSpec::Expectations::ExpectationNotMetError with message matching /expected #<struct Person name="Correct name", age=33> not to have attributes {age: 33}/, got #<RSpec::Expectations::ExpectationNotMetError: expected #<struct Person name="Correct name", age=33> not to have attributes {:age => 33}> with backtrace:
         # ./spec/rspec/matchers/built_in/have_attributes_spec.rb:127:in 'block (4 levels) in <top (required)>'
         # ./spec/rspec/matchers/built_in/have_attributes_spec.rb:128:in 'block (3 levels) in <top (required)>'
     # ./spec/rspec/matchers/built_in/have_attributes_spec.rb:128:in 'block (3 levels) in <top (required)>'
...
...

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

1 participant