From 6bbb05c3b4684d01416dd4101a0565428fde0884 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sat, 2 Jan 2016 23:21:29 -0500 Subject: [PATCH] Fix test --- tests/src/test/scala/cats/tests/FoldableTests.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/test/scala/cats/tests/FoldableTests.scala b/tests/src/test/scala/cats/tests/FoldableTests.scala index a4976f60a7..de91808d69 100644 --- a/tests/src/test/scala/cats/tests/FoldableTests.scala +++ b/tests/src/test/scala/cats/tests/FoldableTests.scala @@ -63,9 +63,9 @@ class FoldableTestsAdditional extends CatsSuite { // more basic checks val names = List("Aaron", "Betty", "Calvin", "Deirdra") F.foldMap(names)(_.length) should === (names.map(_.length).sum) - val sumM = F.foldM(names, "") { (acc, x) => (Some(acc + x): Option[String]) } + val sumM = F.foldM(names, Eval.later { "" }) { (acc, x) => (Some(acc + x): Option[String]) } assert(sumM == Some("AaronBettyCalvinDeirdra")) - val notCalvin = F.foldM(names, "") { (acc, x) => + val notCalvin = F.foldM(names, Eval.later { "" }) { (acc, x) => if (x == "Calvin") (None: Option[String]) else (Some(acc + x): Option[String]) } assert(notCalvin == None)