原因は両方共に implicit conversion があるからです。
type mismatch;
[error] found : Int(1)
[error] required: ?{def day: ?}
[error] Note that implicit conversions are not applicable because they are ambiguous:
[error] both method richInt in trait IntImplicits of type (n: Int)com.github.nscala_time.time.RichInt
[error] and method intToRichLong in trait TimeConversions of type (v: Int)TimeRangeSpec.this.longAsTime
[error] are possible conversion functions from Int(1) to ?{def day: ?}
[error] 1.day
[error] ^
[error] one error found
[error] (redshift/test:compile) Compilation failed
[error] Total time: 3 s, completed May 22, 2014 8:33:52 PM
Specs2 は NoTimeConversions
という trait を用意しているので、 mixin することで specs2 側の implicit を無効にできる。
import org.specs2.mutable.Specification
class FooSpec extends Specification with NoTimeConversions