New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem calling global methods(?) #416
Comments
Assuming That said, you should just be able to pass count a block and both should work: FactoryGirl.define do
factory :installment_billing do
count { Forgery(:basic).number }
end
end Any reason for not just assigning it explicitly? |
Hey, thanks for the quick reply! The block thing crashes with the same (IIRC) "undefined method" error as above, though at run-time, not at load-time.
Yes, I just ended up yanking all the forgery calls from the factories, as they had to go anyway. The reason I posted this is more that I'm worried that something's fundamentally going wrong with the delayed loading, since it worked fine before (without |
@joliss nothing jumps out at me, to be honest. In |
To get FG working with Spork, I added
require: false
in Gemfile and putSo far so good. But now that FG is getting loaded later, the following does not work any more:
It throws
Apparently Forgery is a method and is overloaded as a class.
But the following works fine:
So I have a workaround, and I know I'm not supposed to use Forgery with FG.
That said, I know there is some magic going on in factory definitions, and I'd be curious, is there anything going wrong that stops global methods from being called? Can I fix it somehow?
The text was updated successfully, but these errors were encountered: