Currently a I am build has the following two lines which I want to create a unit test for:
system @command.join(' ')
exit $?.exitstatus
Now I know I can do something like this:
Kernel.should_receive(:system).with()
Kernel.should_receive(:exit).with(0)
However when gem calls $?.exitstatus
I've been unable to mock/stub this.
Does anyone know how to do this??