Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to use 'make' syntax (machinist) in factory_girl 4.0?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andy K  
View profile  
 More options Aug 17 2012, 5:17 pm
From: Andy K <a...@bobics.com>
Date: Fri, 17 Aug 2012 14:17:23 -0700 (PDT)
Local: Fri, Aug 17 2012 5:17 pm
Subject: How to use 'make' syntax (machinist) in factory_girl 4.0?

Or more precisely, why were the extra syntax classes removed?  What is the plan for replacement?  Are we supposed to not use them anymore?  Write our own require?  Include a separate gem?

Lastly, where was this announced / documented?

Thanks,
-Andy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Clayton  
View profile   Translate to Translated (View Original)
 More options Aug 24 2012, 10:32 am
From: Josh Clayton <jclay...@thoughtbot.com>
Date: Fri, 24 Aug 2012 07:32:04 -0700 (PDT)
Local: Fri, Aug 24 2012 10:32 am
Subject: Re: How to use 'make' syntax (machinist) in factory_girl 4.0?

Hey Andy,

We removed them because we feel that the syntax introduced in FactoryGirl 2
is the ideal solution; it requires no monkey-patching and works with all
ORMs, not just ActiveRecord. There will be no replacement.

We deprecated the alternate syntaxes in 3.2.0 so there would've been a lot
of output when running tests warning you that the syntax was removed. Since
we're following SemVer, we removed the syntax completely in 4.0. This
announcement was made when I released FG 3.2 during RailsConf:
http://robots.thoughtbot.com/post/21719164760/factorygirl-3-2-so-awes....
We also have a NEWS file (
https://github.com/thoughtbot/factory_girl/blob/master/NEWS) that itemizes
big changes to the codebase, where it was listed as well.

If you were using RSpec's described_class to piggyback off of the make
syntax, we've changed build/create/build_stubbed/attributes_for to accept a
class in addition to symbols to refer to the factory - this was done
specifically to help during the removal of the alternate syntaxes:
https://github.com/thoughtbot/factory_girl/commit/f83c27e15d00beff864....
This feature was released in 3.4.0, so if you want to rollback to the
latest 3.x (3.6.1), you should be all set to convert these over gradually
until you're ready to upgrade to 4.0.

Hopefully I covered everything; let me know if you have any more upgrade
questions.

Best of luck,
- Josh


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »