[rspec-users] Rspec approach to test model

Kaleem Ullah lists at ruby-forum.com
Wed Feb 11 13:40:52 EST 2009


Scott Taylor wrote:
> On Feb 11, 2009, at 8:51 AM, Kaleem Ullah wrote:
> 
>>    @user=User.new
>>    @user.active= '1'
>>    @user.reset_password_token= ''
>>  end
> 
> You could benefit from a factory / data builder.  See
> FixtureReplacement, Fixjour, Factory girl, one of the many others out
> there which would build this stuff *once* for you.

Hi Scott Taylor,

I am in need of such data builders.

So nice of you... :)


-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list