Re: [Rails-core] Predictable seed

2016-02-19 Thread Ken Collins
I hope this does not feel like a plug: https://github.com/metaskills/named_seeds There is a talk I have around this gem/concept I have been using for several years. The general idea is: * Factories generate Valid Garbage™ which is 100% random. * Test fixtures take advantage of said factories bu

Re: [Rails-core] Predictable seed

2016-02-18 Thread Ben Colon
A consistent database ... but with some random fields ;) I guess, it's simpler to run a seed with 1.times { User.create! :first_name => Faker::Name.first_name } than loading an hardcoded file with 1 users. Ben Le mercredi 17 février 2016 20:21:30 UTC+1, Derek Prior a écrit : > > Interes

Re: [Rails-core] Predictable seed

2016-02-17 Thread Derek Prior
Interesting idea. If what you're after is consistent data, why are you randomizing anything? On Wed, Feb 17, 2016 at 9:48 AM, Ben Colon wrote: > Hey there, > > In many projects, I guess like everyone, we're using the seed file to > generate a bunch of models with random data. > Obviously, after