{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/23949","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/23949/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/23949/comments","events_url":"https://api.github.com/repos/akka/akka/issues/23949/events","html_url":"https://github.com/akka/akka/issues/23949","id":272538121,"number":23949,"title":"[test-kit] Add `expectFailureMessage`","user":{"login":"mentegy","id":5845992,"avatar_url":"https://avatars2.githubusercontent.com/u/5845992?v=4","gravatar_id":"","url":"https://api.github.com/users/mentegy","html_url":"https://github.com/mentegy","followers_url":"https://api.github.com/users/mentegy/followers","following_url":"https://api.github.com/users/mentegy/following{/other_user}","gists_url":"https://api.github.com/users/mentegy/gists{/gist_id}","starred_url":"https://api.github.com/users/mentegy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mentegy/subscriptions","organizations_url":"https://api.github.com/users/mentegy/orgs","repos_url":"https://api.github.com/users/mentegy/repos","events_url":"https://api.github.com/users/mentegy/events{/privacy}","received_events_url":"https://api.github.com/users/mentegy/received_events","type":"User","site_admin":false},"labels":[{"id":92667537,"url":"https://api.github.com/repos/akka/akka/labels/0%20-%20new","name":"0 - new","color":"ffffff","default":false},{"id":243500627,"url":"https://api.github.com/repos/akka/akka/labels/discuss","name":"discuss","color":"bfe5bf","default":false},{"id":103379421,"url":"https://api.github.com/repos/akka/akka/labels/t:testing","name":"t:testing","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-11-09T11:56:05Z","updated_at":"2017-11-10T07:25:50Z","closed_at":null,"author_association":"NONE","body":"when actor replies with a failure, e.g.\r\n```scala\r\nsender() ! akka.actor.Status.Failure(new RuntimeException(\"w/e\"))\r\n```\r\ntest kit does not allow easy way to test it, user should do something like:\r\n```scala\r\nval e = expectMsgType[Status.Failure].cause\r\ne.isInstanceOf[RuntimeException] shouldBe true\r\ne.getMessage shouldBe \"w/e\"\r\n```\r\nHowever it would be great to have `expectFailureMessage` method which will work like scalatest's `intercept`:\r\n\r\n```scala\r\n expectFailureMessage[RuntimeException].getMessage shouldBe \"w/e\"\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/343394844","html_url":"https://github.com/akka/akka/issues/23949#issuecomment-343394844","issue_url":"https://api.github.com/repos/akka/akka/issues/23949","id":343394844,"user":{"login":"johanandren","id":666915,"avatar_url":"https://avatars3.githubusercontent.com/u/666915?v=4","gravatar_id":"","url":"https://api.github.com/users/johanandren","html_url":"https://github.com/johanandren","followers_url":"https://api.github.com/users/johanandren/followers","following_url":"https://api.github.com/users/johanandren/following{/other_user}","gists_url":"https://api.github.com/users/johanandren/gists{/gist_id}","starred_url":"https://api.github.com/users/johanandren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanandren/subscriptions","organizations_url":"https://api.github.com/users/johanandren/orgs","repos_url":"https://api.github.com/users/johanandren/repos","events_url":"https://api.github.com/users/johanandren/events{/privacy}","received_events_url":"https://api.github.com/users/johanandren/received_events","type":"User","site_admin":false},"created_at":"2017-11-10T07:25:50Z","updated_at":"2017-11-10T07:25:50Z","author_association":"MEMBER","body":"In a test you don't need to use ask, because expectNnn has a timeout."}}
{"actor":{"display_login":"johanandren"}}