I am getting the following compiler error as I switched on the compiler flags as per sbt-toplecat.
await(myService(request).value).isLeft shouldBe true
Now compiler complains:
discarded non-Unit value
await(myService(request).value).isLeft shouldBe true
^
This shouldBe matcher is from Scalatest:
def shouldBe(right: Any): Assertion = {
if (!areEqualComparingArraysStructurally(leftSideValue, right)) {
val (leftee, rightee) = Suite.getObjectsForFailureMessage(leftSideValue, right)
val localPrettifier = prettifier // Grabbing a local copy so we don't attempt to serialize AnyShouldWrapper (since first param to indicateFailure is a by-name)
indicateFailure(FailureMessages.wasNotEqualTo(localPrettifier, leftee, rightee), None, pos)t
}
else indicateSuccess(FailureMessages.wasEqualTo(prettifier, leftSideValue, right))
}
What do I need to do to resolve this? Obviously the assertion will be true or false so I always get a non-Unit value which is then discarded.