Hello, good folk of rspec-users.
Iâ€™m writing my first Ruby â€˜binaryâ€™ (i.e., a script meant to be used
as a standalone system command) and Iâ€™m wondering how to RSpec it.
(Caveat: With all of my other code I almost alwyas do BDD, but as this
was my first â€˜binaryâ€™ and these were my first Trollop steps, I ended up
writing the code first.)
â€˜From insideâ€™? This means turning most of the script into one (or few)
callable method(s) and then testing them; the idea of accomodating the
code to be easier to test seems to miss the point, though.
â€˜From outsideâ€™ (i.e., run it with Kernel#` and observe output and
side-effects)? This feels more like behaviour testing, and Iâ€™m leaning
towards it, but I have a gut feeling there might be another choice that