changing message to any object that responds to 'to_s' so it can be used in the message
updating raise message invalid pattern tests