-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Trait not registered: class #276
Comments
Is this the full and unmodified version of the factory file? The things that stand out to me are that it's looking for a trait when you're clearly asking for an association (at least, that's what it seems like to me). The implicit declaration is where this is determined: https://github.com/thoughtbot/factory_girl/blob/master/lib/factory_girl/declaration/implicit.rb Why it's not recognizing that as another factory is boggling me. If you have the real factories available, that would probably help a lot. Thanks! |
@joshuaclayton Thanks for replying so quickly. The code is from a client project, which is why I posted the edited factories. I thought I'd posted the important bits, but apparently not. I've updated the before gist to reflect the entire factories.rb file (with the model names changed). This led me to the fix: Apparently calls to fixture_file_upload need to be wrapped in
should be
instead. |
Ah, yeah, that'll do it. Typically I wrap all my attributes where I assign values in blocks. It shouldn't cause a slowdown and it helps prevent some of these oddities :-) |
I'm working on a rails 3.1.3 app. I wanted to check out rails 3.2.0.rc2. After updating the rails gem, I started getting this error from factory girl.
I've put together a couple gists that include my gemfile and factories, and the output I'm seeing.
before and after
The only changes that have been made from before to after are to the gemfile.
The text was updated successfully, but these errors were encountered: