This is a very sensitive question and a very careful answer is being drafted. Generally, tasting food in the state of fasting should not be a routine but in certain cases like a chef working in the kitchen of a hotel or restaurant who has to cook for hundreds, or a woman whose husband is fussy about the taste and amount of salt and spice, or a daughter in law whose mother in law is very strict about the taste of food then scholars have said that it is allowed.
Tasting is done through the tongue and not stomach.
Feeding means the food reaches the stomach. There are two ways through which food enters into the stomach. One by mouth and other by the nose. That is why you must have seen in hospitals, certain patients being fed through the nose with an insertion of a tube. Therefore, if a chef or a woman under compulsion tastes the food on the tongue and Allah has kept the faculty of taste on the tongue and it has nothing to do with the stomach. So if a person under such compulsion tastes the food and spits out immediately then his fast does not get invalidated.
As long as a food item does not reach the stomach your fast is safe.
Consider this:
The water that comes in your water tap is salty. (This is in reference to sea-water in Gulf) If you are at home and perform wudhu (ablution) in the state of fasting, the water that you used for gargling, will give you a taste of salt and maintain the taste of saltiness on your tongue for quite some time. In such case would you do tayammum to avoid the salty feeling on your tongue for the cause of saving your fast? No scholar allows tayammum in such a case. If you analyse your action, you will realize that your fast does not break because you took salt water and spit it out without gulping it down the throat.
Here is a Hadith to support the ruling that the fast will be damaged only if you consume a food item or a drink:
Sabarah (Allah be pleased with him) was told by the Prophet (peace be upon him), “When you perform wudhu (ablution) then you must gargle and rinse your mouth properly, as well as put water in your nose and sniff it (strongly so that water reaches up and throws out any particle that is stuck up) but do not take the water in your nostrils if you are fasting (because if the water runs down through your throat it will damage your fast)
The purpose of gargling during wudhu is to drive out any food particle that is stuck between the teeth so that it does not distract you while you are fasting or praying. This is because when you are gargling some of the food particles that were stuck in between the teeth will come out and touch your tongue too. This this action does not affect your fast and serves as a proof that as long as a food particle remains in your mouth or nose it does not affect your wudhu till it goes down your throat to your stomach.
Here is another Hadith to drive away your confusion
Consider this:
You are traveling via sea and the only option to do wudhu is the sea water which is salty. You have to perform wudhu with the sea water (even if you are fasting).
Abu Huraira (Allah be pleased with him) asked the Messenger of Allah about performing wudhu while traveling in a boat He asked, “We carry only limited water to drink but at times while fishing we go far away in the sea. Should we perform wudhu with that drinking water (which is non-salty) or should we preserve it for drinking?"
The Prophet (peace be upon him) replied, “The sea water is pure and its dead (fish and other animals which are permitted) are halal.” The Prophet (peace be upon him) was referring to the usage of sea water for wudhu and that includes gargling too.
If you perform wudhu with salt water, the taste remains on your tongue for quite a long time. This applies while fasting as well. Since the taste of the salt water does not invalidate the fast scholars have concluded that food tasted under justified reason will also not invalid your fast.
Using a fresh miswak is also allowed during fast
The Prophet (peace be upon him) used to use Yadish and Rutaba (dry as well as fresh) Miswak while fasting ( Sahih Hadith)
If you chew any miswak which is fresh it will have a different taste than the dry. Even the juice from the stem of miswak will run in your mouth. This is true whether the miswak is a Neem, or Bawad or from any tree. This shows that even the Prophet (peace be upon him) used to get the taste of the fresh miswak and he used to spit it out as normally done while doing miswak. The ruling from all the examples given above are proofs that even though the taste of the food touches your tongue yet your fast is still valid.
Misconceptions arise because the fatwas are given by the people who are ignorant
Such misconceptions are a result of the rapid spread of fatwas in the sub-continent of India. Fifty years ago there was a ruling that even using of the toothbrush was not allowed at all because it was said to be made up of the hair of pig. The fatwa was issued on the basis of rumour spread by the people who did not even know that the brush was made up of nylon and not the hair of the pig.
In 1943, There was an Islamic conference in Allahabad where the Imam was not allowed to lead the prayers on the mic as it was said that it produced an artificial sound. This was because the one who issued the fatwa did not know the science of sound system. Even today many Masjids in India do not allow the Imam to use the mic in prayers. Thus the people were deprived of listening to the melodious Qirat lead by Imam.
Some fatwas are due to wrong analogy
Some people disallow using of miswak citing this Hadith: "The smell from the mouth of the one who fast is very beloved to Allah."
There are two reasons for the emission of smells from the mouth. One is due to the bacteria that are collected in our mouth due to unhygienic attitude because of not cleaning the mouth after the meal during the suhur. At times it happens that a person sleeps after suhur and then he wakes up and reports for work or goes for Dhuhr prayer without brushing his teeth. This is disliked because the Hadith says: "Clean your mouth before coming to Masjid because not only people but even the angels feel uncomfortable due to the foul smell."
The other smell emits from the empty stomach of the one who fasts. This smell is unavoidable and it is the one which is favoured by Allah in the above Hadith.
So we get two rulings from the above answer:
1) A food item used to taste in justified situations will not damage your fast.
2) Using miswak (brushing of teeth with toothpaste included) is allowed while in the state of fasting.
Therefore, it is allowed for a chef or a woman under pressure of cooking well to taste the food and spit it out, but this exemption should not be generalised rather it should be considered as an option only in certain cases as mentioned above.
Shaykh Zafar ul Hasan