rspec 3 - stub a class method
Solution 1:
You should do
allow(MyMod::Utils).to receive(:find_x).and_return({something: 'testing'})
Check out the doco Method stubs.
You should do
allow(MyMod::Utils).to receive(:find_x).and_return({something: 'testing'})
Check out the doco Method stubs.