AdaptFunction

org.specs2.matcher.MatchersCreation.AdaptFunction
implicit class AdaptFunction[T, S](f: T => S)

this implicit provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases:

  • def haveExtension(extension: =>String) = ((_:File).getPath) ^^ endWith(extension)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def ^^(m: Matcher[S]): Matcher[T]