I’m working on a project that allows users to upload files. Right now, I have tests written to handle uploading files, but not verifying those files. I know I want to eventually run this in a background process, and I’ve found plenty of RSpec gems for Sidekiq. I know how to parse and verify the files, but I want to approach this using TDD, as I’ve approached everything else in my project from a TDD perspective so far.
My main issue is trying to figure out how to start out with writing my tests. What would I write a test for first? I assume I’d continue writing an integration test - like “A User should not be able to upload an invalid file” - but past that, I’m lost. I’ve been trying to figure it out, but I haven’t been able to land on anything solid enough to me to start writing.
Does anyone have any thoughts? I’m not necessarily asking for someone to give me the exact answer, but maybe shove me in the right direction. I’ve tried Googling around for people using Sidekiq to see how they’ve approached writing their tests, but I’ve not had any luck so far.