Purpose of Factory girl?

What’s the purpose of using Factory girl?

Replace fixtures for creating data for your tests. As app gets bigger,
fixtures become brittle. With Factory Girl (or Machinist) you can create
just the test data you need for a given test.

Best Wishes,
Peter

Thanks - what exactly are fixtures? And do Factory Girl and Machinist
serve the same purpose?

You can get an idea about fixtures here:
http://guides.rubyonrails.org/testing.html#the-low-down-on-fixtures

http://guides.rubyonrails.org/testing.html#the-low-down-on-fixturesAnd
the
guides are a great resource to understand the basics about Rails.

Factory Girl and Machinist serve the same purpose but in my opinion it’s
easier to generate data for your tests using them.

Check their pages to see more: https://github.com/notahat/machinist and
https://github.com/thoughtbot/factory_girl_rails


Carlos Galdino
codecleaning.com

Come on man - that’s what google is for. Check out some of the 101 stuff
so we can help with anything you can’t get in 2 mind on google.

Best Wishes,
Peter

First read about testing. Once you know what testing is all will be
clear.

Thanks Carlos!

On 8 March 2011 15:47, Gaba L. [email protected] wrote:

Thanks - what exactly are fixtures?

Have a look through the Rails Guides.

Work through the free tutorial at railstutorial.org and many of the
basic things that you have been asking about will become clear. Other
things may become less clear of course :slight_smile:

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs