Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to exclude implicit time convertions in org.spec2.time and use your own?

I'm trying to use specs2, and I have a problem with implicit conversions which are blended with those imported by me from scala.concurrent.duration._, is there any way to exclude implicite conversions from the scope?

import org.specs2.mutable.Specification
import scala.concurrent.duration._

class StatisticsSampleCacheSpec extends Specification {

    val map: Map[Long, Duration] = Map(
        1L -> 5.minute,
        3L -> 3.day,
        5L -> 5.day,
        7L -> 30.day)
}
like image 729
Eddie Jamsession Avatar asked Aug 14 '13 11:08

Eddie Jamsession


1 Answers

It's quite common problem, try to mix-in org.specs2.time.NoTimeConversions trait:

class StatisticsSampleCacheSpec extends Specification with NoTimeConversions
like image 97
Infinity Avatar answered Nov 07 '22 11:11

Infinity