fixed SPEC_BEGIN and SPEC_END tests