Skip to content

Commit bf67b10

Browse files
author
Damir Vandic
committed
update to scalatest 3.0.0, sbt 0.13.12, and scala 2.11.8
1 parent cf8aa67 commit bf67b10

File tree

20 files changed

+53
-66
lines changed

20 files changed

+53
-66
lines changed

core_tests/src/main/scala/com/paulbutcher/test/IsolatedSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
package com.paulbutcher.test
2222

2323
import org.scalamock.scalatest.MockFactory
24-
import org.scalatest.{ FlatSpec, ShouldMatchers, OneInstancePerTest }
24+
import org.scalatest.{FlatSpec, Matchers, OneInstancePerTest}
2525

26-
class IsolatedSpec extends FlatSpec with MockFactory with ShouldMatchers with OneInstancePerTest {
26+
class IsolatedSpec extends FlatSpec with MockFactory with Matchers with OneInstancePerTest {
2727

2828
def repeat(n: Int)(what: => Unit) {
2929
for (i <- 0 until n)

core_tests/src/test/scala/com/paulbutcher/test/matchers/ArgThatTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
package com.paulbutcher.test.matchers
2222

2323
import org.scalamock.scalatest.MockFactory
24-
import org.scalatest.{ FlatSpec, ShouldMatchers }
24+
import org.scalatest.{ FlatSpec, Matchers }
2525

26-
class ArgThatTest extends FlatSpec with ShouldMatchers with MockFactory {
26+
class ArgThatTest extends FlatSpec with Matchers with MockFactory {
2727

2828
behavior of "ArgThat"
2929

core_tests/src/test/scala/com/paulbutcher/test/matchers/MockParameterTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
package com.paulbutcher.test.matchers
2222

2323
import org.scalamock.matchers.{MatchAny, MatchEpsilon, MockParameter}
24-
import org.scalatest.{FreeSpec, ShouldMatchers}
24+
import org.scalatest.{FreeSpec, Matchers}
2525

26-
class MockParameterTest extends FreeSpec with ShouldMatchers {
26+
class MockParameterTest extends FreeSpec with Matchers {
2727

2828
"A mock parameter should" - {
2929
"be equal" - {

core_tests/src/test/scala/com/paulbutcher/test/mock/MockTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ package com.paulbutcher.test.mock
2323
import com.paulbutcher.test._
2424
import org.scalamock.function.FunctionAdapter1
2525
import org.scalamock.scalatest.MockFactory
26-
import org.scalatest.{ShouldMatchers, FreeSpec}
26+
import org.scalatest.{Matchers, FreeSpec}
2727
import some.other.pkg._
2828

2929
import scala.reflect.ClassTag
3030
import scala.reflect.runtime.universe.{ TypeTag, typeTag }
3131
import scala.util.{Try, Failure}
3232

33-
class MockTest extends FreeSpec with MockFactory with ShouldMatchers {
33+
class MockTest extends FreeSpec with MockFactory with Matchers {
3434

3535
autoVerify = false
3636

core_tests/src/test/scala/com/paulbutcher/test/mock/MockTestManyParams.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import com.paulbutcher.test.{ManyParamsClass, ManyParamsTrait}
2424
import org.scalamock.scalatest.MockFactory
2525
import org.scalatest._
2626

27-
class MockTestManyParams extends FreeSpec with MockFactory with ShouldMatchers {
27+
class MockTestManyParams extends FreeSpec with MockFactory with Matchers {
2828
autoVerify = false
2929

3030
"Mocks should" - {

frameworks/scalatest/src/main/scala/org/scalamock/scalatest/AbstractMockFactory.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
package org.scalamock.scalatest
2222

2323
import org.scalamock.MockFactoryBase
24-
import org.scalatest.exceptions.TestFailedException
25-
import org.scalatest.{Failed, Outcome, Suite, SuiteMixin}
24+
import org.scalatest.exceptions.{StackDepthException, TestFailedException}
25+
import org.scalatest._
2626

27-
trait AbstractMockFactory extends SuiteMixin with MockFactoryBase { this: Suite =>
27+
trait AbstractMockFactory extends TestSuiteMixin with MockFactoryBase with TestSuite {
2828

2929
type ExpectationException = TestFailedException
3030

@@ -48,7 +48,7 @@ trait AbstractMockFactory extends SuiteMixin with MockFactoryBase { this: Suite
4848
}
4949

5050
protected def newExpectationException(message: String, methodName: Option[Symbol]) =
51-
new TestFailedException(_ => Some(message), None, failedCodeStackDepthFn(methodName))
51+
new TestFailedException((_: StackDepthException) => Some(message), None, failedCodeStackDepthFn(methodName))
5252

5353
protected var autoVerify = true
5454
}

frameworks/scalatest/src/main/scala/org/scalamock/scalatest/MockFactory.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
package org.scalamock.scalatest
2222

2323
import org.scalamock.clazz.Mock
24-
import org.scalatest.Suite
24+
import org.scalatest.TestSuite
2525

2626
/**
2727
* Trait that can be mixed into a [[http://www.scalatest.org/ ScalaTest]] suite to provide
@@ -137,5 +137,4 @@ import org.scalatest.Suite
137137
*
138138
* See [[org.scalamock]] for overview documentation.
139139
*/
140-
trait MockFactory extends AbstractMockFactory with Mock { this: Suite =>
141-
}
140+
trait MockFactory extends AbstractMockFactory with Mock with TestSuite

frameworks/scalatest/src/main/scala/org/scalamock/scalatest/PathMockFactory.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ package org.scalamock.scalatest
2222

2323
import org.scalamock.MockFactoryBase
2424
import org.scalamock.clazz.Mock
25-
import org.scalatest.exceptions.TestFailedException
26-
import org.scalatest.{ SuiteMixin, Suite }
25+
import org.scalatest.exceptions.{StackDepthException, TestFailedException}
26+
import org.scalatest.{Suite, SuiteMixin}
2727

2828
/**
2929
* Trait that can be mixed into org.scalatest.path.* specs (e.g. path.FunSpec).
@@ -33,13 +33,12 @@ import org.scalatest.{ SuiteMixin, Suite }
3333
*
3434
* See [[MockFactory]] for more information.
3535
*/
36-
trait PathMockFactory extends SuiteMixin with MockFactoryBase with Mock {
37-
this: Suite =>
38-
36+
trait PathMockFactory extends SuiteMixin with MockFactoryBase with Mock { this: Suite =>
37+
3938
type ExpectationException = TestFailedException
4039

4140
protected def newExpectationException(message: String, methodName: Option[Symbol]) =
42-
new TestFailedException(_ => Some(message), None, failedCodeStackDepthFn(methodName))
41+
new TestFailedException((_: StackDepthException) => Some(message), None, failedCodeStackDepthFn(methodName))
4342

4443
/**
4544
* Verify all expectations.

frameworks/scalatest/src/main/scala/org/scalamock/scalatest/proxy/MockFactory.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@ package org.scalamock.scalatest.proxy
2222

2323
import org.scalamock.proxy.ProxyMockFactory
2424
import org.scalamock.scalatest.AbstractMockFactory
25-
import org.scalatest.Suite
25+
import org.scalatest.TestSuite
2626

2727
/** Trait that can be mixed into a [[http://www.scalatest.org/ ScalaTest]] suite to provide
2828
* proxy mocking support.
2929
*
3030
* See [[org.scalamock]] for overview documentation.
3131
*/
32-
trait MockFactory extends AbstractMockFactory with ProxyMockFactory { this: Suite =>
33-
}
32+
trait MockFactory extends AbstractMockFactory with ProxyMockFactory with TestSuite

frameworks/scalatest/src/test/scala/org/scalamock/test/scalatest/BasicTest.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ package org.scalamock.test.scalatest
2222

2323
import org.scalamock.scalatest.MockFactory
2424
import org.scalamock.test.mockable.TestTrait
25-
import org.scalatest.FlatSpec
26-
import org.scalatest.ShouldMatchers
25+
import org.scalatest.{FlatSpec, Matchers}
2726

2827
/**
2928
* Tests for mock defined in test case scope
3029
*
3130
* Tests for issue #25
3231
*/
33-
class BasicTest extends FlatSpec with ShouldMatchers with MockFactory {
32+
class BasicTest extends FlatSpec with Matchers with MockFactory {
3433

3534
"ScalaTest suite" should "allow to use mock defined in test case scope" in {
3635
val mockedTrait = mock[TestTrait]

0 commit comments

Comments
 (0)