Spit the dummy

Reference to an infant spitting out their dummy (or pacifier) in order to cry. 'To spit the dummy' is to give up.