You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrong number of arguments. Expected 0, got 1.
The reason is Book.instance_method(:initialize).arity is 0;
Which is supposed to be -1. Book.new takes *args, so initialize is failing when testing with RSpec.
The text was updated successfully, but these errors were encountered:
mock_model("Book")
allow(Book).to receive(:new).with({}) { book_instance }
Wrong number of arguments. Expected 0, got 1.
The reason is Book.instance_method(:initialize).arity is 0;
Which is supposed to be -1. Book.new takes *args, so initialize is failing when testing with RSpec.
The text was updated successfully, but these errors were encountered: