A man came to the Prophet. The Prophet ﷺ sent a messenger to his wives (to bring something for that man to eat) but they said that they had nothing except water. Then Messenger of Allah ﷺ said, "Who will take this (person) or entertain him as a guest?" An Ansar man said, "I." So he took him to his wife and said to her, "Entertain generously the guest of Messenger of Allah ﷺ " She said, "We have got nothing except the meals of my children." He said, "Prepare your meal, light your lamp and let your children sleep if they ask for supper." So she prepared her meal, lighted her lamp and made her children sleep, and then stood up pretending to mend her lamp, but she put it off. Then both of them pretended to be eating, but they really went to bed hungry. In the morning the Ansari went to Messenger of Allah ﷺ who said, "Tonight Allah laughed or wondered at your action." Then Allah revealed: "But give them (emigrants) preference over themselves even though they were in need of that And whosoever is saved from the covetousness Such are they who will be successful." (59.9)
أَنَّ رَجُلاً أَتَى النَّبِيَّ ﷺ فَبَعَثَ إِلَى نِسَائِهِ فَقُلْنَ مَا مَعَنَا إِلاَّ الْمَاءُ فَقَالَ رَسُولُ اللَّهِ ﷺ مَنْ يَضُمُّ أَوْ يُضِيفُ هَذَا فَقَالَ رَجُلٌ مِنَ الأَنْصَارِ أَنَا فَانْطَلَقَ بِهِ إِلَى امْرَأَتِهِ فَقَالَ أَكْرِمِي ضَيْفَ رَسُولِ اللَّهِ ﷺ فَقَالَتْ مَا عِنْدَنَا إِلاَّ قُوتُ صِبْيَانِي فَقَالَ هَيِّئِي طَعَامَكِ وَأَصْبِحِي سِرَاجَكِ وَنَوِّمِي صِبْيَانَكِ إِذَا أَرَادُوا عَشَاءً فَهَيَّأَتْ طَعَامَهَا وَأَصْبَحَتْ سِرَاجَهَا وَنَوَّمَتْ صِبْيَانَهَا ثُمَّ قَامَتْ كَأَنَّهَا تُصْلِحُ سِرَاجَهَا فَأَطْفَأَتْهُ فَجَعَلاَ يُرِيَانِهِ أَنَّهُمَا يَأْكُلاَنِ فَبَاتَا طَاوِيَيْنِ فَلَمَّا أَصْبَحَ غَدَا إِلَى رَسُولِ اللَّهِ ﷺ فَقَالَ ضَحِكَ اللَّهُ اللَّيْلَةَ أَوْ عَجِبَ مِنْ فَعَالِكُمَا فَأَنْزَلَ اللَّهُ {وَيُؤْثِرُونَ عَلَى أَنْفُسِهِمْ وَلَوْ كَانَ بِهِمْ خَصَاصَةٌ وَمَنْ يُوقَ شُحَّ نَفْسِهِ فَأُولَئِكَ هُمُ الْمُفْلِحُونَ}