Factories give a lot more functionality, including inheritance and get really 
fancy when combined with stuff like Faker. I don't think that the discussion 
here should be whether factories are useful or not, but if they are a good 
enough value added to rails.

I personally like the added functionality and expressability of factories and 
do not mind the extra time it takes to run the tests. But in my opinion what 
should really be taken in account is what we want someone that is just starting 
to test with rails to be using. Are fixtures really the best way to it? If so 
then maybe we could just add some reference in the documentation to other ways 
of doing it (factories), if not then changing the default to factories or 
extracting everything to separate gems and leave it to the user would be two 
possible solutions, IMO.

On Jul 5, 2012, at 8:18 PM, Rafael Mendonça França wrote:

> In my experience using factories are, at least, twice slower than using 
> fixtures. I always prefer to use fixtures.
> 
> I don't see any real gain in removing it from Rails, neither extracting it to 
> a gem.
> 
> Rafael Mendonça França
> http://twitter.com/rafaelfranca
> https://github.com/rafaelfranca
> 
> 
> 
> On Thu, Jul 5, 2012 at 3:48 PM, Olek Janiszewski <[email protected]> 
> wrote:
> Hi guys,
> 
> I've noticed the trend of trimming the fat from Rails in preparation for 
> version 4 (which I appreciate).
> 
> Do you think it'd make sense to also remove the test fixtures engine from 
> Rails 4? From what I've seen, it's now more common to use more advanced 
> solutions, with FactoryGirl leading the pack, and it's usually more practical 
> to use Ruby to define fixtures, rather than YAML.
> 
> More specifically:
> 
> - would the core team approve of such effort?
> - how much work would it mean?
> - (related) how tightly are fixtures actually used within Rails' tests?
> 
> It's hard to me to estimate the overall value/cost ratio, but if it's high 
> enough, I'd be willing to take a shot at it.
> 
> -- 
> Bye,
> Olek Janiszewski (exviva)
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Core" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/rubyonrails-core/-/MNYYrHc3b_gJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-core?hl=en.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Core" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-core?hl=en.

Cumprimentos,
Luís Ferreira



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to