[rspec-users] spec for not null
Diwakar, ANGLER - EIT
diwakar at angleritech.com
Tue May 26 03:18:58 EDT 2009
Thank you David it works
From: rspec-users-bounces at rubyforge.org [mailto:rspec-users-bounces at rubyforge.org] On Behalf Of David Chelimsky
Sent: Monday, May 25, 2009 6:57 PM
Subject: Re: [rspec-users] spec for not null
On Mon, May 25, 2009 at 6:51 AM, Diwakar, ANGLER - EIT <diwakar at angleritech.com> wrote:
> how should we check not null in rspec
> user_valid = @user.valid?
> password_credential_valid = @password.valid?
> I am getting the below error
> Mock 'User_1001' received unexpected message :valid? with (no
Assuming that @user is the same mock object that is causing the error, you need to tell the @user that it should receive valid?:
I'm not sure what this has to do with checking for not null.
rspec-users mailing list
rspec-users at rubyforge.org
More information about the rspec-users