writing RSpec tests for complex batches/callbacks #1529
Unanswered
anarchivist
asked this question in
Q&A
Replies: 1 comment
-
I simply execute the whole batch through GoodJob's inline adapter and then assert that all of the intended side effects have taken place. I'll also use Timecop and (I use Timecop instead of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i'm using GoodJob for a work project, and i wanted to know if there's any guidance about how to test complex batches with RSpec. i've already made some refactoring passes to keep the jobs themselves lean and call methods on models or service objects elsewhere in the codebase.
for reference, the job structure sort of looks like this. there's a mix of jobs - some "mice" which are fairly easy to fan out, and others that need to wait until one sets of those "mice" are done.
Beta Was this translation helpful? Give feedback.
All reactions