Deductions & credits

What happens if you both don't meet the requirements? Spouse 1 owned and lived in home for more than 2 years but spouse 2 just moved in. Would it be best for them to file separately so at least spouse 1 will be exempt but spouse 2 have to pay capital gains tax?