Food Europe Spartans are through to the fourth round the of the Scottish Cup after a hard-fought 2-1 victory over Lowland League title-chasers Bonnyrigg Rose.