Hello and welcome to JustAnswer. Please note: This is general information for educational purposes only and is not legal advice. No specific course of action is proposed herein, and no attorney-client relationship or privilege is formed by speaking to an expert on this site. By continuing, you confirm that you understand and agree to these terms.
No - it is not that simple, or guaranteed.
Yes, a spouse can divorce - this is correct.
However, just because she is not working does not mean that he would automatically get the kids.
The Court decides on custody based on the rule of thumb of "best interest of the child." This includes, but is not limited to, general stability of the parent, financial stability, indoctrination of the child in the current school and environment, household condition and living condition of the child, other persons living in the house, etc - see NC § 50-13.2. The courts generally do not like to split the custody 50/50 since this is hard on the child unless both parents agree to this.
One parent usually becomes the custodian and the other parent becomes the "visiting" parent which is generally one day a week, every other weekend, and alternating holidays. The nuanced points of the custody can either be decided by the parties or the Court, if the parties cannot come to an agreement.
Even if a parent does not get managing custody, they are almost guaranteed visitation unless they have a drug problem, alcohol dependency, or an unsafe home environment. Abuse and or neglect of the child or previous children are an almost automatic bar for even visitation, although supervised visitation may be granted by the Court.
Of course, that is the standard order of possession. That order can be modified if both parties agree or if the Court finds that it is an extraordinary situation.
So if someone is telling you that they will definitely get custody, this is simply not true. Even if the parent is unemployed, that is one of many things to consider. However, gainful employment (or pursue thereof) is helpful in a custody battle.
I hope this helps and clarifies. Please use the SEND or REPLY button to keep chatting, or please RATE when finished. You may always ask follow ups at no charge after rating. Kindly rate my answer as one of TOP THREE FACES/STARS and then SUBMIT, as this is how experts get credit for our time. Rating my answer the bottom two faces/stars (or failing to submit the rating) does not give me credit and reflects poorly on me, even if my answer is correct. I work very hard to formulate an informative and honest answer for you; please reciprocate my good faith with a positive rating.