Generate error message dynamically to fix spec for Ruby 1.9.3