$shibayu36->blog;

クラスター株式会社のソフトウェアエンジニアです。エンジニアリングや読書などについて書いています。

ScalaTestのshouldBeとmustBeの違いは何か

ScalaTestのMatchers系にshouldBeとmustBeがあって、どういう違いがあるのだろうと気になったので調べてみたのでメモ。

http://www.scalatest.org/user_guide/using_matchers を読むと、

Trait MustMatchers is an alternative to Matchers that provides the exact same meaning, syntax, and behavior as Matchers, but uses the verb must instead of should. The two traits differ only in the English semantics of the verb: should is informal, making the code feel like conversation between the writer and the reader; must is more formal, making the code feel more like a written specification.

と書いていて、両方共機能的違いはまったくなく、単にshouldとmustというメソッド名が違うというだけだった。まじか...