Keep in mind SD cards are not generally as durable as SSDs or HDDs, so rpi servers are doable but you should make sure to back it up. Some folks connect SSDs and make the sd card read-only for booting. I haven’t done this myself as I prefer towers.
Also be sure to not let your pi lose power, this can corrupt the sd card.
Huh… I’ve used Guard and TDD to do this in Ruby, works great. Yes you’re testing the happy path, but it is easy to define negative tests as well.