TV

‘Mindy Project’ channels classic rom-coms in season finale

Warning: This article contains spoilers

Fans of “The Mindy Project” know that its heroine, Dr. Mindy Lahiri (Mindy Kaling), is a hopeless romantic, willing her love life to play out like a Hollywood romantic comedy — and in Tuesday night’s Season 2 finale, it finally did.

The episode, titled “Danny and Mindy,” starts out with Mindy reading a “missed connection” ad from a guy named Andy she made eyes with on the subway and decides to pursue him even after Danny (Chris Messina) warns her against it (“You’re gonna wind up in The Post: ‘OB Slayed By SOB,’ ” he says).

From there, she’s sent on a chase to meet Mr. Right, which includes numerous pitch-perfect allusions to classic rom-coms, such as “Sleepless in Seattle” and “You’ve Got Mail.”

Here’s a recap of the tribute scenes.

Mindy flirts with a mystery lover online (‘You’ve Got Mail’)

Like Tom Hanks and Meg Ryan in “You’ve Got Mail,” Mindy and Andy start a courtship by e-mail. He channels Tom Hanks’ dialogue from the movie when telling her about his daily coffee shop routine and all of its espresso-based drinks before writing, “I think we should meet in person. Please let me know if you’re interested. Oh how I hope that you are.”

In another nod to the movie, where Meg Ryan’s cyberlover turned out to be her professional nemesis, the audience finds out “Andy” is actually Danny — who broke Mindy’s heart earlier this season.

Mindy breaks off her current relationship to pursue the mystery guy (‘Sleepless in Seattle’)

Isabella Vosmikova/Fox
Feeling guilty about pursuing “Andy” while still dating Charlie (Tim Daly), Mindy asks him to dinner. Charlie immediately figures out she has feelings for another guy and wants to explore them — just like Meg Ryan explains to her jilted fiancé (Bill Pullman) in “Sleepless in Seattle.”

Danny visits Mindy when she’s sick (‘You’ve Got Mail’)

Jordin Althaus/Fox
Having waited for Andy at the top of the Empire State Building and getting stood up, Mindy is home with a cold and gets a visit from Danny — just like Tom Hanks visits a sick Meg Ryan in “You’ve Got Mail” after standing her up — both still not knowing the true identity of their mystery man. But while in the film Tom brings Meg daisies (her favorite flower), Danny offers to watch Mindy’s favorite movie, “When Harry Met Sally . . .”

Danny and Mindy meet at the top of the Empire State Building (‘Sleepless in Seattle’)

Jordin Althaus/Fox
After months pass, Mindy finally finds out that Danny “catfished” her by pretending to be Andy, and he admits he still loves her and wants her back. He tells her to meet him that evening at the top of the Empire State Building — just like in “Sleepless.” Like Meg Ryan, Mindy has an exchange with the building security guard, although instead of helping her out, he tells her the elevator is broken and she must climb 104 flights of stairs.

Danny — who had given up on Mindy coming and left — finds out she’s on her way and sprints through the streets of New York to get there in time (an allusion to Billy Crystal in “When Harry Met Sally . . .”). By the time Danny gets to the Empire State Building, the observation deck is emptying out — but he manages to find his girl, laying on the ground from exhaustion. But this story has a happy ending — the two reconcile and start to kiss.

Call it Happily Ever After — at least until next season.