Given a ruby script with a bunch of functions, how can you unit test the functions in the script without running the script itself? Here is an example script, and here is its unit test.
For example, using require or load in my unit test causes the script to execute before the tests execute. I have many of these scripts and I really prefer they remain unaltered.
I guess I could load the file as a string, chop it up in memory and run eval - if viable, this feels like a terrible solution.
Any thoughts or suggested strategies would be greatly appreciated.