org.specs2.specification.core.AsExecution[scala.util.Try[org.specs2.matcher.MatchResult[String]]] 类型的证据参数的 specs2 隐式值

问题描述

这不会编译:

import org.specs2.concurrent.ExecutionEnv
import org.specs2.mutable._
import scala.util.Using

class Specs2Solution(implicit ee: ExecutionEnv) extends Specification {
  "The string" should {
    "contain the word scala" in {
      Using(io.source.fromURL("https://scalacourses.com")) { contents =>
        contents.getLines().mkString.toLowerCase must contain("scala")
      }
    }
  }
}

错误信息是:Could not find implicit value for evidence parameter of typeorg.specs2.specification.core.AsExecution[scala.util.Try[org.specs2.matcher.MatchResult[String]]] "contain the word scala" in {

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)