Rspec has a new way to stub methods.
The old `.stub()` and `.stub_chain()` methods are deprecated.

Now you should use:

    allow(object).to receive_message_chain(:method, :chain).and_return(value)