Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby User Authentication with Rails Adding User Support to Our Application Adding Test Helpers

Fenian Noakes
PLUS
Fenian Noakes
Courses Plus Student 5,212 Points

Fill in the blank to create the "User" factory

I have watched this stage a few times - trying to now answer the question in the next stage -but cannot seem to pass it. I have to say - this whole module so far with Jason has been very hard work indeed! I have really enjoyed the other parts of the Rails Track - until module with Jason. I would recommend that it be updated entirely.

Please help with the below question. Thanks

Fill in the blank to create the "User" factory:

factory ******** do ... end

1 Answer

Seth Reece
Seth Reece
32,867 Points

There's a good docs page here on FactoryGirl. In this case you would use:

factory :user do
  stuff you want assigned to user based on how user model is built
end

Hope that helps.

Fenian Noakes
Fenian Noakes
Courses Plus Student 5,212 Points

many thanks Reece - apologies for the delay in response. Really appreciate your fast and helpful reply. Cheers