Fixed bug with stubbing rand method

I'm not sure how to stub rand in Kernel, so this will have to do.