What Defines a Food as Edible?
As far as I know, edibility (wow, I'm surprised that passes the spell checker!) is not a strictly defined term, biologically or otherwise. Humans have been around eating and drinking stuff long before the scientific method was around to study this question rigorously, and before there were regulatory agencies charged with approving new products as "safe." As one might imagine, knowledge of what is and is not edible was likely passed down by oral tradition and personal experience.

Honestly, I'm not even sure designating a food (or a substance) as edible or inedible really makes much sense. Let's consider wild fruit, as mentioned in your question. If ingesting 5 or more berries of hypothetical fruit X causes your body to have a nasty reaction, then we could probably agree that fruit X is toxic and inedible (even if eating only 1 or 2 berries might not elicit the same reaction). On the other hand, ingesting berries of hypothetical fruit Y causes no reaction unless consumed in much larger quantities (maybe 100 or more berries). Although fruit Y does cause a reaction when ingested in excessive amounts, it would be a stretch to call it inedible. This principle applies to many foods that we typically consider edible but can be unhealthy or even dangerous when taken in excess.

So where do we draw the line? How much of a substance do you have to ingest without an adverse reaction to deem it edible? I don't think there is an objective answer to this question. It is complicated further by the vast amounts of variation in the human population: food allergies, differences in tolerance to certain substances, etc.