Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Stubbing proxy fails on non-ActiveRecord classes #19
I've created a branch which makes the stubbing strategy more friendly for non-AR classes.
The main issue is that the stubbing proxy calls #new which won't work if #initialize takes requires arguments. The fix is to fall back to #allocate when #new fails.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
One of factory_girls' basic requirements is that initialize works without arguments. I know that doesn't work for a lot of non-ActiveRecord classes, but I don't want to change this for one build strategy unless I decide to change the general API requirements for factory_girl.