Nethack is an example of one of these games, and my experiences with it (although they were frustrating and painful for me personally) are the ones I'm going to relate to in this regard.
E.g. there is often an "Altar" that one can pray or sacrifice corpses at.
Nethack may be the very game you are referencing here, and things like this were one of my pet peeves. I should not have to go to an outside source to see what things I can do with an object. The problem with text based games is that there are occasionally a lot of actions,that players can perform, but may not be immediately obvious to the player, and thus are punished for it. (seeing as praying and sacrificing were typically good things.) Instead of simply letting their mind's wander about why this object even exists, why not let things like examine give them more information? "This altar is adorned in white marble. A small circle of blood can be seen on the stone, along with a prayer (Let's assume the player-character can read) etched in to its surface." Perhaps that's not even enough information, but it gives the idea that not only have others prayed here, but there's a reason for that circle. I'm all for 'discovering' these actions, perhaps once you've examined it will give you a list of 'obvious' things you can do with it? Instead of just blindly typing 'kneel', 'dance', 'sing a gospel song', it'll say if you do 'interact' and have examined it previously. 'pray or sacrifice' for special actions.
Edit: This ties in with what I wrote down below, but my 'white marble' altar could be useful in hiding what alignment the altar was from the player (NH had I believe Chaotic, Neutral, and Lawful). Perhaps the white implies that it's likely Lawful, could be neutral, and is very very unlikely chaotic, perhaps a 0% chance even.)
or know that praying can result in a bad outcome.
To be fair, the player in this instance IS playing a rogue-like, and it should kind of be expected. If it's not, it certainly will be. It would be interesting to build off the altar example if you were to include hints about different effects, rather than spell them out for the player. "Nearby the floor is singed, as if lightning struck indoors .How peculiar!" or "The smell cleanliness wafts from this altar." (Perhaps not a great idea, as it might imply that the altar always does those things, but hopefully my point is clear enough.)
magical fruits that players can pluck and eat. Different fruits do different things. Some heal you, some are poisonous etc. There is no way to tell except to experiment. I was hoping this (and other mysterious objects) would give players a sense of exploration: finding out strange things and trying them out.
Here's another aspect that I think Nethack did right and wrong. (or perhaps I missed an action I could have done, that's totally plausible too.) In that game, fruits were fruits and there was no difference between them. However, where a similar aspect applies is in two places. One: Scrolls. Two: Wands. Potions were another case but I think due to the nature of them they were reasonable in how you experimented (Drink or break it over something's head basically). Scrolls were enigmas. It might be a Cursed Scroll of Genocide or a Blessed Scroll of Wish, and as far as I knew, beyond having a curse / bless detection spell or item, you couldn't determine anything about the scroll before reading it. There were no implied relationships between a 'good' scroll and a 'bad' one. Perhaps a fireball spell and an icebolt spell would look very similar, and if you had read one already you'd know they were similar. Maybe this is for the best, I don't really know, but it certainly frustrated me. That game was hard enough, and having to restart 90% more often because the best 'strategy' was to drink / read everything you come across for the first 20 minutes (and inevitably drinking a potion of boil or fiery death or something) was just an un-fun mechanic.
Wands however, they did it right. Wands were generally 'good', in that typically pointing it at an enemy and zapping them with it wasn't an action you were going to regret (minus wasting a charge and letting them get closer / maul you again). However, one thing you could do with them on top of 'using' them properly was write with them. Granted, it was depicted as more dragging it around on the floor, but one could tell a lot about the wand by the way it interacted with the stone. Leaves a sear in its wake? Wand of Fiery Death. Sparks shoot out this way and that? Can probably safely bet it'll be shooting a lightning bolt at the next thing you point it at. There were lots of these effects, and some were immediate and obvious, but others were not. Wand that resists you dragging it along the ground? Wand of Force (Push Spell).
Basically I think there needs to be a way to 'experiment' without using the item proper, especially if there are deadly things that could come with using it. In your fruit example, why wouldn't there be an option to nibble? Perhaps you'd only get a vague idea of whether there was something wrong with it. "You nibble the apple. You feel a little ill but quickly shake it off. You eat the apple. Your stomach rumbles and burns! (Take damage) You are now immune to poison!" Or something like that. Why not also potentially harm and benefit the player at the same time? These experiments do not have to be all knowledge granting like in the wand example ( I think all the write effects were unique, don't quote me on that though ) but for food, perhaps a whole class of bad things makes you ill, but positive effects are left to the unknown. About to die in a fight and the apple was fine but the cherry was not? Chances are eating the mysterious apple is a safer bet, even if the cherry wouldn't necessarily kill you, and might even help more (If that's something you decided to do).
Granted, the big issue with what I just typed up...there's no punishment for experimenting. Why not nibble everything? That I can't answer at this very second because I haven't thought of a solution! But having that element of randomness I think is always a little exciting, I just hated having no way to determine what things were other than blindly using / drinking / reading them. I loved wands for this reason. It was always exciting to not look things up, but feel like I had some semblance of knowledge in the game. That is of course, after looking up that I could write with them in the first place. Figures~