Use RSpec::Mocks.allow_message instead of Object#stub.