Sahih Muslim, Book 13, Hadith 208 (Muslim 2677)

Abu Huraira (Allah be pleased with him) reported Allah's Apostle (ﷺ) as saying:

If any one of you is invited to a meal when he is fasting, he should say:" I am fasting."