Skip to main content

2 docs tagged with "shell"

View All Tags

RSpec

Shell can be tested with Ruby's RSpec library which runs the solution shell script as a subprocess. The runshell(args true) function is provided to facilitate this. Calling runshell(2, 3, 4) effectively runs bash -c $(cat solution.sh) 2 3 4 and returns the script's stdout as a string.