Skip to content

Commit 0aa5158

Browse files
committed
Revert "Scalatest 3.2.2"
This reverts commit 88e49fd.
1 parent 88e49fd commit 0aa5158

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ object Version {
55
val mockito = "1.5.18"
66
val scala = "2.13.3"
77
val crossScala = List(scala, "2.11.12", "2.12.12")
8-
val scalaTest = "3.2.1"
8+
val scalaTest = "3.0.8"
99
val slf4j = "1.7.30"
1010
}
1111

src/test/scala/com/typesafe/scalalogging/LoggerSpec.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ import java.io._
2121
import org.mockito.ArgumentMatchers._
2222
import org.mockito.Mockito._
2323
import org.slf4j.{ Logger => Underlying }
24-
import org.scalatest.matchers.should.Matchers
25-
import org.scalatest.wordspec.AnyWordSpec
24+
import org.scalatest.{ Matchers, WordSpec }
25+
import org.scalatestplus.mockito.MockitoSugar
2626

2727
trait Varargs {
2828
// TODO: we used to wrap in List(...): _*, which I assume was to force the varags method to be chosen.
2929
// I encapsulated that here in something that works across 2.12/2.13.
3030
def forceVarargs[T](xs: T*): scala.Seq[T] = scala.Seq(xs: _*)
3131
}
3232

33-
class LoggerSpec extends AnyWordSpec with Matchers with Varargs {
33+
class LoggerSpec extends WordSpec with Matchers with MockitoSugar with Varargs {
3434

3535
// Error
3636

@@ -603,7 +603,7 @@ class LoggerSpec extends AnyWordSpec with Matchers with Varargs {
603603
val arg5ref = arg5.asInstanceOf[AnyRef]
604604
val arg6 = 6L
605605
val arg6ref = arg6.asInstanceOf[AnyRef]
606-
val underlying = mock(classOf[org.slf4j.Logger])
606+
val underlying = mock[org.slf4j.Logger]
607607
when(p(underlying)).thenReturn(isEnabled)
608608
val logger = Logger(underlying)
609609
}

src/test/scala/com/typesafe/scalalogging/LoggerTakingImplicitSpec.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ package com.typesafe.scalalogging
22

33
import org.mockito.ArgumentMatchers._
44
import org.mockito.Mockito._
5+
import org.scalatestplus.mockito.MockitoSugar
6+
import org.scalatest.{ Matchers, WordSpec }
57
import org.slf4j.{ Logger => Underlying }
6-
import org.scalatest.matchers.should.Matchers
7-
import org.scalatest.wordspec.AnyWordSpec
88

9-
class LoggerTakingImplicitSpec extends AnyWordSpec with Matchers with Varargs {
9+
class LoggerTakingImplicitSpec extends WordSpec with Matchers with MockitoSugar with Varargs {
1010

1111
case class CorrelationId(value: String)
1212

@@ -378,14 +378,14 @@ class LoggerTakingImplicitSpec extends AnyWordSpec with Matchers with Varargs {
378378
def fixture(p: Underlying => Boolean, isEnabled: Boolean) =
379379
new {
380380
implicit val correlationId = CorrelationId("corrId")
381-
implicit val canLogCorrelationId = mock(classOf[CanLog[CorrelationId]])
381+
implicit val canLogCorrelationId = mock[CanLog[CorrelationId]]
382382
val msg = "msg"
383383
val cause = new RuntimeException("cause")
384384
val arg1 = "arg1"
385385
val arg2 = Integer.valueOf(1)
386386
val arg3 = "arg3"
387387
val logMsg = "corrId - msg"
388-
val underlying = mock(classOf[org.slf4j.Logger])
388+
val underlying = mock[org.slf4j.Logger]
389389
when(p(underlying)).thenReturn(isEnabled)
390390
when(canLogCorrelationId.logMessage(anyString(), any[CorrelationId])).thenReturn(logMsg)
391391
val logger = Logger.takingImplicit[CorrelationId](underlying)

src/test/scala/com/typesafe/scalalogging/LoggerWithMarkerSpec.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import org.mockito.ArgumentMatchers._
2121
import org.mockito.Mockito._
2222
import org.slf4j.{ Logger => Underlying }
2323
import org.slf4j.Marker
24-
import org.scalatest.matchers.should.Matchers
25-
import org.scalatest.wordspec.AnyWordSpec
24+
import org.scalatest.{ Matchers, WordSpec }
25+
import org.scalatestplus.mockito.MockitoSugar
2626

2727
object DummyMarker extends Marker {
2828
def add(childMarker: Marker): Unit = {}
@@ -39,7 +39,7 @@ object DummyMarker extends Marker {
3939
def remove(child: Marker): Boolean = false
4040
}
4141

42-
class LoggerWithMarkerSpec extends AnyWordSpec with Matchers with Varargs {
42+
class LoggerWithMarkerSpec extends WordSpec with Matchers with MockitoSugar with Varargs {
4343

4444
// Error
4545

@@ -389,7 +389,7 @@ class LoggerWithMarkerSpec extends AnyWordSpec with Matchers with Varargs {
389389
val arg1 = "arg1"
390390
val arg2 = Integer.valueOf(1)
391391
val arg3 = "arg3"
392-
val underlying = mock(classOf[org.slf4j.Logger])
392+
val underlying = mock[org.slf4j.Logger]
393393
when(p(underlying)(marker)).thenReturn(isEnabled)
394394
val logger = Logger(underlying)
395395
}

src/test/scala/com/typesafe/scalalogging/LoggerWithTaggedArgsSpec.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package com.typesafe.scalalogging
22

3+
import org.scalatest.{ Matchers, WordSpec }
4+
35
import org.slf4j.{ Logger => Underlying }
6+
import org.scalatestplus.mockito.MockitoSugar
47
import org.mockito.Mockito._
5-
import org.scalatest.matchers.should.Matchers
6-
import org.scalatest.wordspec.AnyWordSpec
78

89
object tag {
910

@@ -17,7 +18,7 @@ object tag {
1718
}
1819
}
1920

20-
class LoggerWithTaggedAargsSpec extends AnyWordSpec with Matchers with Varargs {
21+
class LoggerWithTaggedAargsSpec extends WordSpec with MockitoSugar with Matchers with Varargs {
2122

2223
trait Tag
2324

@@ -101,7 +102,7 @@ class LoggerWithTaggedAargsSpec extends AnyWordSpec with Matchers with Varargs {
101102
new {
102103
val arg1 = tag[Tag][String]("arg1")
103104
val arg2 = tag[Tag][Integer](Integer.valueOf(1))
104-
val underlying = mock(classOf[org.slf4j.Logger])
105+
val underlying = mock[org.slf4j.Logger]
105106
when(p(underlying)).thenReturn(isEnabled)
106107
val logger = Logger(underlying)
107108
}

0 commit comments

Comments
 (0)