specs2 組み込みのマッチャーを使用できることを報告します。

例:


  class TestSpec extends Specification { def is = s2"""
    This is a spec
    opt
      should contain 1                                  $e1
                                                        """
    def e1 = {

      val opt = Some(1)

      opt must equalTo (Some(1))
    }
  }

クイックフィックス適用後:


  class TestSpec extends Specification { def is = s2"""
    This is a spec
    opt
      should contain 1                                  $e1
                                                        """
    def e1 = {

      val opt = Some(1)

      opt must beSome(1)
    }
  }