Islamic Ruling on Fasting during Pregnancy
Question

Is it mandatory for a pregnant woman to observe fasting in Ramadan and Ashura. I advised my wife not to fast during last Ramadan and she was not fasting because she was pregnant. She was weak and anemic last time when she was pregnant. She had miscarried by the end of Ramadan when she was 12 weeks pregnant. What is the ruling about her missed fasting during Ramadan? Does she have to complete them before next Ramadan? Can she fast normally when she finds that she is pregnant? She always insists on fasting during pregnancy. Any medical evidences will also help that the baby won't be harmed by fasting during pregnancy.
Praise be to Allah.This question covers three topics: 
1-The ruling on a pregnant woman breaking her fast in Ramadan
2-How a miscarriage in Ramadan affects a woman’s fast
3-The ruling on making up fasts after Ramadan
Fasting during pregnancy: Obligatory?
It is permissible for a pregnant woman not to fast if she fears some harm which she thinks will most likely affect her and/or her baby. Breaking the fast becomes obligatory if she fears that she may die or be severely harmed if she fasts. In that case, she has to make up the fast later on but she does not have to pay the fidyah. This is according to the consensus of the fuqaha, because Allah says (interpretation of the meanings): 
“And do not kill yourselves.” [al-Nisa 4:29] 
“and do not throw yourselves into destruction.” [al-Baqarah 2:195]
The scholars are similarly agreed that it is not obligatory to pay the fidyah in this case, because a woman in this case is like one who is sick and one who fears for his life. 
If the woman fears for her baby only (and not for herself), then some of the scholars are of the view that it is permissible for her to break her fast , but they say that she must make up the fast later on and pay the fidyah (which means feeding one poor person for each day not fasted), because of the report narrated from Ibn 'Abbas concerning the verse (interpretation of the meaning): 
“And as for those who can fast with difficulty, (e.g. an old man), they have (a choice either to fast or) to feed a Miskin (poor person) (for every day).” [al-Baqarah 2:184]
Ibn 'Abbas said: 
“This is a concession allowed to old men and women, who can only fast with difficulty; they are allowed to break the fast and to feed one poor person for each day of fasting missed . This also applies to pregnant and nursing women, if they are afraid.” Abu Dawud said: “i.e., if they are afraid for their children, they may break the fast.” (Narrated by Abu Dawud, 1947; classed as sahih by al-Albani in al-Irwa, 4/18, 25) (See al-Mawsu’ah al-Fiqhiyyah, 16/272) 
Hence it is clear that if fasting will cause great harm to a woman or to her baby, she is obliged to break the fast, on condition that the doctor who states that fasting will cause harm is a doctor who can be trusted. 
This has to do with breaking the fast during Ramadan. With regard to ‘Ashura , fasting on this day is not obligatory, according to scholarly consensus; rather it is mustahabb, and it is not permissible for a woman to observe a nafl fast when her husband is present, except with his permission. If he tells her not to fast then she has to obey him, especially if that is in the interests of the fetus. 
How a miscarriage in Ramadan affects a woman’s fast
With regard to miscarriage: “If the matter is as mentioned, that the miscarriage occurred in the third month of pregnancy , then the blood that comes out is not considered to be the blood of nifas (bleeding following childbirth), rather it is the blood of istihadah (non-menstrual vaginal bleeding), because what the woman passed was a clot (‘alaqah) in which there were no human features. On this basis, she should pray and fast even if she sees some blood, but she should do wudu for each prayer, and she has to make up the days when she did not fast and the prayers that she missed.” (See Fatawa al-Lajnah al-Daimah, 10.218) 
Ruling on making up missed fasts by a pregnant woman
With regard to the fasts that a pregnant woman has missed: “Everyone who owes fasts from Ramadan has to make them up before the next Ramadan . They may delay that until Sha’ban. But if the next Ramadan comes and he has not made them up and had no excuse for that, then he is guilty of sin and he has to make them up as well as feeding one poor person for each day, as was stated by a number of the Companions of the Prophet (peace and blessings of Allah be upon him). The amount to be given is half a sa’ of the local staple food for each day, which may be given to a number of poor persons or to one. But if a person had an excuse for delaying making up the fasts, because he was sick or was traveling, then all he has to do is to make up the missed fasts, and he does not have to feed the poor, because of the general meaning of the verse (interpretation of the meaning):
‘but if any of you is ill or on a journey, the same number (should be made up) from other days.’ [al-Baqarah 2:184].
 And Allah is the Source of strength.”  (Fatawa al-Shaykh Ibn Baz, 15/340)
And Allah knows best.