Change spec to check error not raised

Change spec to check error not raised