Skip to content

Commit

Permalink
cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
barkhorn committed Apr 20, 2019
1 parent fc719ff commit 8ef606c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shared/src/main/scala/org/scalamock/MockFactoryBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ trait AbstractMockFactoryBase extends Mock with MockFunctions with Matchers { th
trait MockFactoryBase extends AbstractMockFactoryBase with MockContext {
import scala.language.implicitConversions

initializeExpectations
initializeExpectations()

override protected def withExpectations[T](what: => T): T = {
if (expectationContext == null) {
// we don't reset expectations for the first test case to allow
// defining expectations in Suite scope and writing tests in OneInstancePerTest/isolated style
initializeExpectations
initializeExpectations()
}

try {
Expand Down Expand Up @@ -78,7 +78,7 @@ trait MockFactoryBase extends AbstractMockFactoryBase with MockContext {
override protected def inSequenceWithLogging[T](what: => T) =
inContext(new OrderedHandlers(logging = true))(what)

//! TODO - https://issues.scala-lang.org/browse/SI-5831
// https://issues.scala-lang.org/browse/SI-5831
implicit val _factory = this

private def initializeExpectations(): Unit = {
Expand Down

0 comments on commit 8ef606c

Please sign in to comment.