add specs for raise in defer