Can you really pull a battery cable and the engine still runs?

I have heard that you can pull a cable off the battery while the engine is running and it will continue running. I don’t remember which cable you pull. I’ve never tried it, but I don’t see how that could work. I seem to remember that it was a way to test your alternator. What do you folks think?