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

Rails 7 Assertion on ActionDispatch::TestResponse: undefined method `keys' for nil:NilClass #183

Closed
sshaw opened this issue Mar 16, 2023 · 4 comments

Comments

@sshaw
Copy link
Contributor

sshaw commented Mar 16, 2023

0.9.0 under Rails 7.0.4.3.

I have this assertion:

expect(response).to be_successful

Where response is an ActionDispatch::TestResponse.

The test fails with the following error:

     NoMethodError:
       undefined method `keys' for nil:NilClass

               keys = hash.keys
                          ^^^^^
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:75:in `insert_hash_inspection_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree_builders/custom_object.rb:22:in `block (2 levels) in call'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:59:in `instance_exec'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:59:in `evaluate_block'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:96:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/nesting.rb:14:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:49:in `block in inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:21:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:41:in `inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/inspection.rb:26:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:19:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/inspection.rb:22:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/as_lines_when_rendering_to_lines.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/nesting.rb:14:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/only_when.rb:22:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:49:in `block in inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:21:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:41:in `inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/inspection.rb:26:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:19:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/inspection.rb:22:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/as_lines_when_rendering_to_lines.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/nesting.rb:14:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/only_when.rb:22:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:49:in `block in inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:21:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:41:in `inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/inspection.rb:26:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:19:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/inspection.rb:22:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/as_lines_when_rendering_to_lines.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/nesting.rb:14:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/only_when.rb:22:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:49:in `block in inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:21:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:41:in `inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/inspection.rb:26:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:19:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/inspection.rb:22:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/as_lines_when_rendering_to_lines.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/nesting.rb:14:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/base.rb:97:in `render_to_string_in_subtree'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/nodes/only_when.rb:22:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:31:in `block in render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `each'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `reduce'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/object_inspection/inspection_tree.rb:30:in `render_to_string'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:49:in `block in inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:21:in `guarding_recursion_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff.rb:41:in `inspect_object'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/monkey_patches.rb:269:in `format'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_builders/base.rb:150:in `description_of'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb:35:in `block in add_actual_value'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_template.rb:124:in `evaluate'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_template.rb:154:in `to_s'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_template.rb:102:in `to_string_in_singleline_mode'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_template.rb:62:in `map'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_template.rb:62:in `to_string_in_singleline_mode'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_template.rb:47:in `length_of_first_paragraph'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_template.rb:54:in `to_s'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/matcher_text_builders/base.rb:27:in `call'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/augmented_matcher.rb:29:in `build_failure_message'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/augmented_matcher.rb:12:in `failure_message'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/super_diff-0.9.0/lib/super_diff/rspec/monkey_patches.rb:25:in `handle_failure'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/handler.rb:56:in `block in handle_matcher'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/expectation_target.rb:65:in `to'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/expectation_target.rb:101:in `to'
     # ...
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:263:in `instance_exec'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:263:in `block in run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:486:in `block in run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
     # ...
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/testing/time_helpers.rb:173:in `travel_to'
     # ...
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:390:in `execute_with'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-rails-6.0.1/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:390:in `execute_with'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:390:in `execute_with'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:486:in `run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:468:in `with_around_example_hooks'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:259:in `run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:646:in `block in run_examples'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:642:in `map'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:642:in `run_examples'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:607:in `run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `block in run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `map'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `block in run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `map'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `block in run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `map'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:608:in `run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `map'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:2070:in `with_suite_hooks'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:116:in `block in run_specs'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/reporter.rb:74:in `report'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:115:in `run_specs'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:89:in `run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:71:in `run'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:45:in `invoke'
     # /Users/sshaw/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.12.0/exe/rspec:4:in `<top (required)>'
     # ./bin/rspec:34:in `load'
     # ./bin/rspec:34:in `<main>'

In lib/super_diff/rspec/monkey_patches.rb:25 message is nil

@sshaw
Copy link
Contributor Author

sshaw commented Mar 16, 2023

I see this is a duplicate of #160. Closing. Using expect(response).to have_http_status(:success) instead of be_successful works.

@sshaw sshaw closed this as completed Mar 16, 2023
@mcmire
Copy link
Collaborator

mcmire commented Mar 17, 2023

Okay, glad you found a workaround. I'm going to reopen this actually because it seems like #160 mentions a hang, but in your case an error gets raised, which is very interesting. It could be that the solution to #160 solves this particular issue too, but it may also be separate.

@mcmire mcmire reopened this Mar 17, 2023
@sshaw
Copy link
Contributor Author

sshaw commented Mar 17, 2023

I'm going to reopen this actually because it seems like #160 mentions a hang, but in your case an error gets raised

Mine hangs too. I knew after a few secs that it must be a recursion error but waited for process to terminate.

@mcmire
Copy link
Collaborator

mcmire commented Mar 18, 2023

@sshaw Ah! Okay. That makes sense then. In that case I will close after all.

@mcmire mcmire closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2023
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