I just want to note that I am not in this position now but I have been in the past and I wasn't sure what the correct course of action was.
I am wondering what someone should do if they are negotiating an offer to work for another company and at the same time their boss offers them a raise. They are very likely to accept the offer from the other company but there is a slight chance that it could fall through. Should they tell the boss that they are declining the offer because they are going to move to another company? Or should they just accept the offer and then leave when the new job is finalized? I feel like the answer would be that you should accept the raise because you should get what you deserve. But if that is true, wouldn't you run the risk of burning bridges if your boss finds out that you are leaving right after you get the raise? On the other hand, if you tell the truth, the offer could fall through and then you have to live with the awkwardness of staying.