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
I am running into an error deep down in Rails when I use mock_model before trying to create an instance of a model. Here is the first part of the backtrace:
WeighInNotifier.skipped_weigh_in_friend(friend, user, weigh_in) should have a reply-to of the user's email
Failure/Error: @user = Factory(:user)
wrong number of arguments (2 for 1)
I am running into an error deep down in Rails when I use mock_model before trying to create an instance of a model. Here is the first part of the backtrace:
Failure/Error: @user = Factory(:user)
wrong number of arguments (2 for 1)
/Users/r38y/.rvm/gems/ree-1.8.7-2010.02@lioli/gems/activesupport-3.0.3/lib/active_support/time_with_zone.rb:311:in `respond_to?'
/Users/r38y/.rvm/gems/ree-1.8.7-2010.02@lioli/gems/activesupport-3.0.3/lib/active_support/time_with_zone.rb:311:in`respond_to?'
I tracked it down to the following line:
https://github.com/rspec/rspec-rails/blob/master/lib/rspec/rails/mocks.rb#L103
I copied this code into my app and changed that to take two arguments and it almost works. The test hangs instead of failing.
I'm happy to fix this if it needs fixing, I just wanted some guidance about it. Thoughts?
The text was updated successfully, but these errors were encountered: