ActiveRecord::Fixtures don't use custom create methods of oracle-enhanced
11 views
Skip to first unread message
Pavel Shapoval
unread,
Jan 7, 2013, 1:50:08 PM1/7/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to oracle-...@googlegroups.com
I'm trying to use ActiveRecord::Fixtures with custom create method and it's don't work (it's use regular model create method and ignore set_create_method) but it works perfectly if I try to use it elsewhere without fixtures. Do some one have any clue?
Raimonds Simanovskis
unread,
Jan 15, 2013, 6:35:15 AM1/15/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to oracle-...@googlegroups.com
ActiveRecord fixtures are not using standard model create method but are using connection insert_fixture method to insert directly rows in corresponding table and skips all ActiveRecord creation logic.
Therefore instead of fixtures I recommend to use some test data factory approach (e.g. use factory_girl gem) or just create your own test helper methods which create data using model create method.