Salwomir Langa, 28, attempted to steal cash from the Sunrise in Niddrie Mains Road in August 2011.
Edinburgh Sheriff Court heard how he threatened a worker, but a neighbour shouted they had called 999 and the robber fled empty handed.
Sheriff Scott deferred sentence on Langa for reports.