I did not find it necessary. Remeber, Option / Either the value of equality. Just map the option / Either instead of matching the values ββthat they contain.
"Option should match other options" >> { Some(21) must be equalTo Some(21) } "Either should match Either" >> { Right("Some string") must be equalTo Right("Some string") }
I did not try to compile them, but they should work. You may need to add explicit text input (or use must_== , which is not type safe)
t.id must be equalTo Some(228106060337135617l) t.id_str must be equalTo Some("228106060337135617") t.created_at.left.map(_.getHours) must be equalTo Left(13)
drstevens
source share