-
Notifications
You must be signed in to change notification settings - Fork 44
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
Use build
in ExampleBot instead of create
+ rollback
#524
Conversation
build
in ExampleBot instead of create
+ rollback
@newstler, you mentioned that making this change would actually break some things that we don't have tests for. Can you provide an example of something that would break? I'd like to look into getting the needed tests in place, but I don't really know what I'm looking for. |
Hey @jagthedrummer, yep I remember about this, and I started writing tests for it. Just got busy with fixing bugs in |
It's not super urgent, but I would like to keep it moving. Can you give me an idea of what you know about that breaks with this change? I literally have zero idea why this is problematic in any way. |
I also have to make some investigation, will try to do it this week. |
@jagthedrummer Answered in the starter repo bullet-train-co/bullet_train#965 (comment) |
ea4a70f
to
003f6d8
Compare
003f6d8
to
45de06a
Compare
45de06a
to
f96ccdf
Compare
f21e718
to
742dc06
Compare
Joint PR: bullet-train-co/bullet_train#965
This PR makes it so that we use
FactoryBot.build
when generating example records inExampleBot
.Doing this so that we don't have to actually create live records, clone them, rollback, then reset primary keys. Doing all of that work is slow so it's best to avoid doing it. (And having to reset primary keys for something that we expect to be a normal thing kind of gives me the willies.)