splitwise/super_diff

wrong number of arguments

sobrinho opened this issue · 4 comments

Hi there!

I'm seeing this error:

       wrong number of arguments (0 for 1) for SuperDiff::ObjectInspection::InspectionTreeBuilders::Main initializer
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/attr_extras-7.1.0/lib/attr_extras/attr_initialize.rb:55:in `validate_arity'
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/attr_extras-7.1.0/lib/attr_extras/attr_initialize.rb:26:in `call'
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/attr_extras-7.1.0/lib/attr_extras/attr_initialize.rb:26:in `block in apply'
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/attr_extras-7.1.0/lib/attr_extras/explicit.rb:73:in `new'
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/attr_extras-7.1.0/lib/attr_extras/explicit.rb:73:in `block (2 levels) in static_facade'
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/super_diff-0.9.0/lib/super_diff.rb:42:in `block in inspect_object'
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/super_diff-0.9.0/lib/super_diff/recursion_guard.rb:21:in `guarding_recursion_of'
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/super_diff-0.9.0/lib/super_diff.rb:41:in `inspect_object'
     # /Users/sobrinho/.gem/ruby/2.7.6/gems/super_diff-0.9.0/lib/super_diff/rspec/monkey_patches.rb:269:in `format'
     # /Users/sobrinho/.gem/ruby/2.7.6/bundler/gems/sidekiq-delay_extensions-bbe5faeaed8b/lib/sidekiq/delay_extensions/class_methods.rb:23:in `perform'

The backtrace after that goes in other gems, let me know if you need it.

mcmire commented

Hi @sobrinho. Can you give me an example of the test you're trying to write? That would help me understand what caused this.

There's nothing too specific there, it's a simple expect(something).to receive(:blah).with(1) and then something.blah(2) which causes the assertion failure to happen.

A lot of different specs with different assertions are failing.

Not sure if it's related to Ruby 2.7.6, I'm trying to isolate it.