Given the effort the matcher puts into figuring out what to put into the error message, I think the regex here should look for something specific based on that logic.

Here I would look for `expect { }.not_to raise_error(SpecificErrorClass) is not valid`, for example.

(This goes for the other specs below).