Colin Law wrote in post #975784:
> On 18 January 2011 17:24, James Byrne <li...@ruby-forum.com> wrote:
>> ...
>> This is not part of any design. I need a small sample of representative
>> test data from a live data set such that each row belongs to a different
>> category and all active categories are represented. Period.
>
> If it is for testing you might be better using Machinist or Factory
> Girl to generate the data.  Then you can generate exactly the data
> required to test each aspect of your app.

Even with a direct solution to your problem Colin, suggestion is still 
quite valid. Testing using a live sampling of data can give a false 
sense of confidence. The better approach to testing is to use a factory 
to manufacture data specifically designed to test some aspect of your 
model.

Testing should be automated, and exist to prevent the possibility of 
invalid data from ever making it into the database. Not to validate 
existing data that is already assumed to be valid.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to