Adapt expected error output to be ruby engine independent

MSP-11103

The message text for NameError is different in Rubinius than in MRI or
JRuby, so use a match instead of contain so a regex can be used that
covers both formats.