bundle install
rails c
> FactoryBot.create(:story)
# ActiveRecord::AssociationTypeMismatch: Account(#70116037268360) expected, got #<Account id: 1, created_at: "2019-08-24 19:13:54", updated_at: "2019-08-24 19:13:54"> which is an instance of Account(#70116063567540)
from /Users/zachminot/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activerecord-6.0.0/lib/active_record/associations/association.rb:279:in `raise_on_type_mismatch!'
> FactoryBot.reload
> FactoryBot.create(:story)
# => works with no error
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
zminot/factory_bot_association_mismatch
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published