Abd al-Rahman bin Abi Layla (may Allah have mercy on him) says: The Companions of Muhammad (peace and blessings be upon him) narrated to us that fasting was prescribed in three stages. The people came to Madinah and had no obligatory fast, so they used to fast three days every month, until the month of Ramadan was made obligatory; they found it a great deal and it was hard upon them. So whoever was able would feed a poor person every day and not fast; they had been given a concession in this, and then it was abrogated by this verse: "And that you fast is better for you, if only you knew" [Surah al-Baqarah: 184]. The narrator says: So they were commanded to fast.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 7894