You can DRY this up in a similar way to [message_with_path](/collectiveidea/json_spec/tree/master/lib/json_spec/messages.rb)