On 7/30/10 5:53 AM, Martin Hawkins wrote:
I have no idea how to approach 'rspec'ing the creation of the
params[:user][:password] and :password_confirmation or the
random_password method and would very much appreciate it if somebody
could spare the time to suggest what I should be doing.
You could stub the random_password method with some value, then perform
the create action, then confirm that the @user variable has that value
for password and password_confirmation. (I forget if instance variables
are accessible in a controller test even after a redirect, so I guess
you'll find out.)
-- Elliot
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users