Fix deprecated method `raise_error(arg)` in specs