John Merlino
2012-Mar-09 23:24 UTC
simulating behavior without actually affecting database
Hey all, A lot of people use factory girl to simulate behavior without affecting database, particularly for testing. I have a situation where this is not for testing but rather someone clicks on button to simulate behavior but we create a User object in order to run the simulation but while I want the results of simulation to be stored in a simulation table I dont want the user to be actually created in user table. Of course the simulation command uses save! on a user (but it only saves the user in real live app but not during the simulation). So do I use factory girl for this inside my models (this is not testing) or is there another way? thanks for response -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.