The Jataka, Vol. II, tr. by W.H.D. Rouse, , at sacred-texts.com
"A holy sage," etc.--This story was told by the Master whilst living at Jetavana, about a hypocritical Brother.
The Brotherhood found out his hypocrisy. In the Hall of Truth they were talking it over: "Friend, Brother So-and-so, after embracing the Buddha's religion, which leads to salvation, still practises hypocrisy." The Master on coming in  asked what they were discussing together. They told him. Said he, "Brethren, it is not the only time this Brother has been a hypocrite; for a hypocrite he was before, when he shammed simply for the sake of warming himself at the fire." Then he told them an old-world tale.
Once on a time, when Brahmadatta was king in Benares, the Bodhisatta was born one of a brahmin family. When he grew up, and his own son was of an age to run about, his wife died; he took the child on his hip, and departed into the Himalayas, where he became an ascetic, and brought up his son to the same life, dwelling in a hut of leaves.
It was the rainy season, and the heaven poured down its floods incessantly: a Monkey wandered about, tormented with the cold, chattering and rattling his teeth. The Bodhisatta fetched a great log, lit a fire, and lay down upon his pallet. His son sat by him, and chafed his feet.
Now the Monkey had found a dress belonging to some dead anchorite. He clad himself in the upper and lower garment, throwing the skin over one shoulder; he took the pole and waterpot, and in this sage's dress he came to the leaf-hut for the fire: and there he stood, in his borrowed plumes.
The lad caught sight of him, and cried out to his father, "See, father--there is an ascetic, trembling with cold! Call him hither; he shall warm himself." Thus addressing his father, he uttered the first stanza:
The Bodhisatta listened to his son; he rose up, and looked; then he knew it was a monkey, and repeated the second stanza: 
With these words, the Bodhisatta seized a firebrand, and scared away the monkey; and he leaped up, and whether he liked the wood or whether he didn't, he never returned to that place any more. The Bodhisatta cultivated the Faculties and the Attainments, and to the young ascetic he explained the process of the mystic trance; and he too let the Faculties and the Attainments spring up within him. And both of them, without a break in their ecstasy, became destined to Brahma's world.
Thus did the Master discourse by way of shewing how this man was not then only, but always, a hypocrite. This ended, he declared the Truths, and identified the Birth:--at the conclusion of the Truths some reached the First Path, some the Second, and yet some the Third:--"The hypocritical Brother was the Monkey, Rāhula was the son, and I was the hermit myself."