In Steinbeck's Of Mice and Men, the author has been preparing us for the death of Curley's wife since the beginning of the novel.
The trouble that George and Lennie had in Weed, where Lennie touched the woman's dress and then had to flee for his life after she claimed he sexually assaulted her is one instance that foreshadowed the trouble with Curley's wife.
Lennie's petting of the dead mouse also prepares us for his killing of Curley's wife. Lennie is attracted to soft things (like the hair of Curley's wife), but he can't control his strength.
Lennie's killing of the puppy also anticipates his dangerous encounter with Curley's wife.
Also, after George and Lennie arrive at the barley farm, they are told that Curley's wife has a wandering eye and likes to flirt with other men on the farm.