[rspec-users] stubbing find in ActiveRecord considering only the first argument

2011-04-20 Thread Rodrigo Rosenfeld Rosas
For some unknown (yet) reason, an association is trying to call Model.find(1, conditions: nil) instead of Model.find(1), which doesn't allow me to write "Model.stub!(:find).with(1).and_returns(@model)". Instead of trying to figure out (I will anyway) why it is been calling this way, what I rea

Re: [rspec-users] stubbing find in ActiveRecord considering only the first argument

2011-04-20 Thread Rodrigo Rosenfeld Rosas
I've just found mock_model: http://rubydoc.info/gems/rspec-rails/2.4.0/frames Seems like it solves my problem ;) Em 20-04-2011 22:34, Rodrigo Rosenfeld Rosas escreveu: For some unknown (yet) reason, an association is trying to call Model.find(1, conditions: nil) instead of Model.find(1), which