If I am using a laptop in clamshell mode, and then I unplug the screen and disconnect the power without opening up the laptop, will it automatically go to sleep or will it stay turned on?
Testing this just now on my personal rMBP, it does not go to sleep immediately. It appears to trigger the sleep at the normal "power adapter sleep" time.a
Under Settings > Energy Saver, you can dictate how it behaves while on battery or while plugged in.
If the Battery sleep setting is set to a particular timespan, it will sleep after that amount of inactivity. If set to "Never", then it will stay on until the battery gets low enough that the safe-sleep mode kicks in.