I am writing an app right now that involves quite a bit of setup. Essentially I would like to test users performing some actions on books. However “publishing” of a book involves quite a lot of steps. Currently I have about 3 sidekiq jobs that need to run sequentially before publish. Here are things I tried:
- bypassing the sidekiq (i.e. call perform directly on the workers), but the tests are still somewhat slow.
- put setup in before(:all) but then I need to worry about dependencies.
Are there other ways to approach to this type of integrated testing?
(BTW, this is not directly related, but recently I’ve also been writing a few things in Go on the backend. Gosh, I’ve been so spoiled by Ruby. There is really no excuse not to write tests in Ruby. But Go really is much much much faster to run. And compiled binaries are much easier to setup to run as well.)