Sen. Ted Cruz's suggestion of an indefinite Supreme Court vacancy under a President Hillary Clinton raises questions about the credibility and integrity of Republicans who have said the next president should get to the choose who fills the vacancy, White House spokesman Josh Earnest said Thursday.

Earnest was asked during Thursday's White House press briefing about the Texas Republican's statement that there is a long historical precedent for a Supreme Court operating with fewer justices.

Earnest replied that the notion of opposing any nomination put forward by a Democratic president would be inconsistent with longstanding Senate tradition. He said historically that the Senate has evaluated candidates based on their merits.

"Republicans this year have deviated from that tradition by refusing to even consider Chief Judge Merrick Garland to fill the vacancy on the Supreme Court," Earnest said.

Cruz's comment also seemingly contradicts an earlier position he took during the GOP primary when he told CNN, "I think 2016 should be a referendum on the Supreme Court."

Sen. John McCain said earlier this month that Republicans would unite against any Supreme Court nominee that Clinton puts forward if she becomes president, though an aide later said that McCain would examine the record of anyone nominated for the high court and vote for or against that person based on their qualifications.

Obama nominated Garland in March to fill the vacancy left by the death of former Justice Antonin Scalia, but Senate Republicans, led by Majority Leader Mitch McConnell, declined to hold hearings as they insisted the voters choosing the next president would have the final say on the vacancy.

Don Stewart, a spokesman for Senate Majority Leader Mitch McConnell, R-Ky., said Thursday that McConnell "has been clear that it will be the next president who makes the nomination for the Scalia vacancy."

The size of the court is set by federal law and has changed over the years, but has been nine justices for most of its existence. Initially, there were six justices. The court reached its highest number, 10, during the Civil War. There has been a nine-justice court since 1869.