the specs2 beRight matcher is not type-checked - is there an equivalent one that is?

55 Views Asked by At

Specs2 has these Either matchers:

private[specs2]
trait EitherBaseMatchers {

  def beRight[T](t: ValueCheck[T]) = RightCheckedMatcher(t)
  def beRight[T](implicit p: ImplicitParam = implicitParameter) = use(p)(new RightMatcher[T])

  def right[T : Diffable](t: T) = beRight(ValueChecks.valueIsTypedValueCheck(t))
  def right[T](t: ValueCheck[T]) = beRight(t)
  def right[T](implicit p: ImplicitParam = implicitParameter) = beRight(p)

So, beRight is not type-checked: how do I use the apparently type-checked ones (using Diffable I guess)?

P.S. of course I am aware of must_===, beLike and so on, that isn't the issue.

0

There are 0 best solutions below