J
James Coglan
[Note: parts of this message were removed to make it a legal post.]
Hi all,
I'd like to write some Cucumber features for a command-line app I'm working
on (specifically, http://github.com/jcoglan/claw). The app runs a Readline
loop taking user input, and uses this input to search for and open files by
running shell commands (grep, gedit, firefox etc.). Right now it's using
#puts and the backtick (`) method for output and shell commands, and I'm not
sure how to go about testing the app's output. Do I mock Kernel#puts, should
I give the app an IO object to write output to so I can collect it, or
soemthing else entirely?
If anyone has advice about how to structure this I'd be most grateful.
Cheers,
James
Hi all,
I'd like to write some Cucumber features for a command-line app I'm working
on (specifically, http://github.com/jcoglan/claw). The app runs a Readline
loop taking user input, and uses this input to search for and open files by
running shell commands (grep, gedit, firefox etc.). Right now it's using
#puts and the backtick (`) method for output and shell commands, and I'm not
sure how to go about testing the app's output. Do I mock Kernel#puts, should
I give the app an IO object to write output to so I can collect it, or
soemthing else entirely?
If anyone has advice about how to structure this I'd be most grateful.
Cheers,
James