{"action":"created","issue":{"url":"https://api.github.com/repos/databricks/scala-style-guide/issues/36","repository_url":"https://api.github.com/repos/databricks/scala-style-guide","labels_url":"https://api.github.com/repos/databricks/scala-style-guide/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/databricks/scala-style-guide/issues/36/comments","events_url":"https://api.github.com/repos/databricks/scala-style-guide/issues/36/events","html_url":"https://github.com/databricks/scala-style-guide/issues/36","id":163351926,"number":36,"title":"Encourage to use `===` instead of `==` for writing unit tests.","user":{"login":"HyukjinKwon","id":6477701,"avatar_url":"https://avatars.githubusercontent.com/u/6477701?v=3","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-01T09:07:31Z","updated_at":"2016-07-01T14:54:31Z","closed_at":null,"body":"`FunSuite` provides `===` for comparison. I see `==` and `===` are used in a mixed way across unit tests. It might be great if this is encouraged documented.\r\n\r\nSee http://www.scalatest.org/getting_started_with_fun_suite\r\n\r\n> ScalaTest lets you use Scala's assertion syntax, but defines a triple equals operator (===) to give you better error messages. The following code would give you an error indicating only that an assertion failed:\r\n> \r\n> assert(1 == 2)\r\n> Using triple equals instead would give you the more informative error message, \"1 did not equal 2\":\r\n> \r\n> assert(1 === 2)"},"comment":{"url":"https://api.github.com/repos/databricks/scala-style-guide/issues/comments/229968020","html_url":"https://github.com/databricks/scala-style-guide/issues/36#issuecomment-229968020","issue_url":"https://api.github.com/repos/databricks/scala-style-guide/issues/36","id":229968020,"user":{"login":"aarondav","id":1400247,"avatar_url":"https://avatars.githubusercontent.com/u/1400247?v=3","gravatar_id":"","url":"https://api.github.com/users/aarondav","html_url":"https://github.com/aarondav","followers_url":"https://api.github.com/users/aarondav/followers","following_url":"https://api.github.com/users/aarondav/following{/other_user}","gists_url":"https://api.github.com/users/aarondav/gists{/gist_id}","starred_url":"https://api.github.com/users/aarondav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarondav/subscriptions","organizations_url":"https://api.github.com/users/aarondav/orgs","repos_url":"https://api.github.com/users/aarondav/repos","events_url":"https://api.github.com/users/aarondav/events{/privacy}","received_events_url":"https://api.github.com/users/aarondav/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T14:54:31Z","updated_at":"2016-07-01T14:54:31Z","body":"As of I think Scala 2.10, ScalaTest's `assert` is a macro which does print nice error messages. If you're working in a 2.10+ codebase, I would recommend double equals, as triple equals can be hard to remember, especially when it's unnecessary."}}
{"actor":{"display_login":"aarondav"}}