A DNA test cannot be done on the spot at the birth.
It's possible to not acknowledge paternity at the time of the birth, but this is likely to create drama if he attends the birth. Why would he attend the birth unless virtually certain it's his?
On a practical level, if he attends the birth, he can voluntarily identify himself as the father at the time. Since mom sounds like she's offended at the thought he's not the father, he probably is and shouldn't cause further drama by doing anything else.
After the birth, he can get a DNA sample from the child and send it off with his own DNA for a test to be done. If it comes back positive, he has confirmation he's the father, and that's the end of it. If it comes back negative, he can go through the court process to disestablish paternity.