Add spec for undo stack clearing