Stubbing Command Line Programs

23 views
Skip to first unread message

andyl

unread,
Apr 3, 2011, 11:47:00 AM4/3/11
to webmoc...@googlegroups.com
I am using rspec/aruba to do integration tests of a command-line program i'm writing.

I'd like to use something like WebMock to stub the network calls in the command-line program.

But with aruba, the program under test runs in a separate process, and I don't think WebMock will work.

I'm thinking of adding a command-line option to my program for testing, and embedding the network faking into the executable.

Alternatively, I could write a local web service that delivers fake results.

But I hate these solutions!  I'm curious if any of you have run into this issue, and if anyone can recommend a better approach.

- Andy
Reply all
Reply to author
Forward
0 new messages