Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: I asked the Messenger of Allah (peace and blessings be upon him): Which people are best? He said: "Those of my generation, then those who come after them, then those who are joined to their time, then those of the era after them. Then a people will come whose testimony will precede their oath, and whose oath will precede their testimony." Ibrahim (may Allah have mercy on him) said: Our companions used to forbid us, when we were boys, from swearing by testimony or by covenant.
The wording of both narrations is the same, except for the phrase "then those who come after them".
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19911