Thank you, it's now working as expected. I was basing the code on what I had seen before, with examples of people stubbing Kernel.system, so I wasn't thinking about just using the object itself.