hi all, now i have a problem when do the functinal testing. assume i have a table named "customers". when i run the first test case, i need 20 records in the "customers" table. when i run the second test case, i need 200 records in the "customers" table. so, if i only use one "customers.yml" fixtures, the first test case will cost much time. then how to use many fixtures for one table? appriciated for your help, thanks! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am not all that happy with fixtures as they are at the DB level and not the model level. You need to get IDs right between files etc. Have you tried just creating a different YML file in the fixtures directory, then splitting your tests into separate classes that reference the different fixtures? I do not know if this will work, but I would expect it to. Michael On May 28, 7:50 pm, Yan Rong <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> hi all, > now i have a problem when do the functinal testing. > assume i have a table named "customers". > > when i run the first test case, i need 20 records in the "customers" > table. > when i run the second test case, i need 200 records in the "customers" > table. > > so, if i only use one "customers.yml" fixtures, the first test case > will cost much time. > > then how to use many fixtures for one table? > > appriciated for your help, thanks! > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
rake db:fixtures:load [FIXTURES=x,y,z] On May 28, 10:50 pm, Yan Rong <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> hi all, > now i have a problem when do the functinal testing. > assume i have a table named "customers". > > when i run the first test case, i need 20 records in the "customers" > table. > when i run the second test case, i need 200 records in the "customers" > table. > > so, if i only use one "customers.yml" fixtures, the first test case > will cost much time. > > then how to use many fixtures for one table? > > appriciated for your help, thanks! > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Joon You wrote:> rake db:fixtures:load [FIXTURES=x,y,z] > > > On May 28, 10:50 pm, Yan Rong <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>i think i cannt use "rake" command in my test class? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---