Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6636429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:11:06+00:00 2026-05-25T23:11:06+00:00

This is an additional note to the question Factory Girl – what’s the purpose?

  • 0

This is an additional note to the question “Factory Girl – what’s the purpose?”

I’m not sure whether my question is counted as a repetitive one, but I’m simply still not very clear after reading that post, since I think my doubt is still different.

Alright, so now that we can always use User.create() in before(:each) block in a Rspec test, why do we still bother using Factory Girl then?

This whole confuse occurred to me when I’m reading Michael Hartl’s “Rails 3 tutorial”, when he suddenly jumped into Factory Girl but used User.create() to build a User instance all the way through before that.

I wish someone can clarify this point for me, thx a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:11:06+00:00Added an answer on May 25, 2026 at 11:11 pm

    You are correct but gems like factory girl and fabrication allow for significantly less code duplication across clases and within different tests when you need to test large sets of data that require different attribute values due to uniqueness requirements. It mixes in methods to easily “manufacture” many different objects for these types of tests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: This was an interview question and may not have an actual use case
One question regarding whether the following code should yield a compiler warning or not
Note: This is an extension of an earlier question I asked here: Do additional
Note: This is an extension of an earlier question I asked here: Do additional
I'm sure this is a stupid question but for some reason its not showing
I was looking at this question: Add additional data to a Highcharts series for
I bumped into an additional question that I needed in regards to this: Using
I'm creating additional module to already multi-module maven project. And for this one I
NOTE: This is a long question. I've explained all the 'basics' at the top
NOTE: Must work on Android 1.5 - ContactsContract does not Simple enough question. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.