Skip to content

Commit 92242a7

Browse files
committed
Updated ScalaTest 3.1.0
1 parent 317a3d1 commit 92242a7

8 files changed

Lines changed: 22 additions & 18 deletions

build.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ lazy val doobie = (project in file("."))
1616
%%("shapeless", V.shapeless),
1717
%%("scalatest", V.scalatest),
1818
%%("scalacheck", V.scalacheck),
19-
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % V.scalacheckShapeless
19+
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % V.scalacheckShapeless,
20+
"org.scalatestplus" %% "scalatestplus-scalacheck" % V.scalatestplusScheck
2021
)
2122
)
2223

project/ProjectPlugin.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ object ProjectPlugin extends AutoPlugin {
1919
val doobie: String = "0.8.6"
2020
val cats: String = "2.0.0"
2121
val shapeless: String = "2.3.3"
22-
val scalatest: String = "3.0.8"
22+
val scalatest: String = "3.1.0"
23+
val scalatestplusScheck: String = "3.1.0.0-RC2"
2324
val scalacheck: String = "1.14.2"
2425
val scalacheckShapeless: String = "1.2.3"
2526
}

src/main/scala/doobie/ConnectingToDatabaseSection.scala

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import DoobieUtils._
1212
import doobie.implicits._
1313
import doobie._
1414
import org.scalaexercises.definitions.Section
15-
import org.scalatest._
15+
import org.scalatest.matchers.should.Matchers
16+
import org.scalatest.flatspec.AnyFlatSpec
1617

1718
/** ==Introduction==
1819
* doobie is a monadic API that provides a number of data types that all work the same way
@@ -96,11 +97,7 @@ import org.scalatest._
9697
*
9798
* @param name connecting_to_database
9899
*/
99-
object ConnectingToDatabaseSection
100-
extends FlatSpec
101-
with Matchers
102-
with Section
103-
with BeforeAndAfterAll {
100+
object ConnectingToDatabaseSection extends AnyFlatSpec with Matchers with Section {
104101

105102
/**
106103
* And here we go.

src/main/scala/doobie/ErrorHandlingSection.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import ErrorHandlingSectionHelpers._
1111
import doobie._
1212
import doobie.implicits._
1313
import org.scalaexercises.definitions.Section
14-
import org.scalatest.{FlatSpec, Matchers}
14+
import org.scalatest.flatspec.AnyFlatSpec
15+
import org.scalatest.matchers.should.Matchers
1516

1617
/**
1718
* ==About Exceptions==
@@ -79,7 +80,7 @@ import org.scalatest.{FlatSpec, Matchers}
7980
*
8081
* @param name error_handling
8182
**/
82-
object ErrorHandlingSection extends FlatSpec with Matchers with Section {
83+
object ErrorHandlingSection extends AnyFlatSpec with Matchers with Section {
8384

8485
/**
8586
* Let's do some exercises where errors will happen and see how to deal with them.

src/main/scala/doobie/MultiColumnQueriesSection.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import doobie.implicits._
1010
import DoobieUtils.CountryTable._
1111
import Model._
1212
import org.scalaexercises.definitions.Section
13-
import org.scalatest.{FlatSpec, Matchers}
13+
import org.scalatest.flatspec.AnyFlatSpec
14+
import org.scalatest.matchers.should.Matchers
1415
import shapeless._
1516
import shapeless.record._
1617
import shapeless.syntax.singleton._
@@ -42,7 +43,7 @@ import shapeless.syntax.singleton._
4243
*
4344
* @param name multi_column_queries
4445
*/
45-
object MultiColumnQueriesSection extends FlatSpec with Matchers with Section {
46+
object MultiColumnQueriesSection extends AnyFlatSpec with Matchers with Section {
4647

4748
/**
4849
* We can select multiple columns and map them to a tuple. The `gnp` column in our table is

src/main/scala/doobie/ParameterizedQueriesSection.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import cats.data.NonEmptyList
1010
import DoobieUtils.CountryTable._
1111
import ParameterizedQueryHelpers._
1212
import org.scalaexercises.definitions.Section
13-
import org.scalatest.{FlatSpec, Matchers}
13+
import org.scalatest.flatspec.AnyFlatSpec
14+
import org.scalatest.matchers.should.Matchers
1415

1516
/**
1617
* Previously we have worked with static SQL queries where the values used to filter data were
@@ -41,7 +42,7 @@ import org.scalatest.{FlatSpec, Matchers}
4142
*
4243
* @param name parameterized_queries
4344
*/
44-
object ParameterizedQueriesSection extends FlatSpec with Matchers with Section {
45+
object ParameterizedQueriesSection extends AnyFlatSpec with Matchers with Section {
4546

4647
/**
4748
* == Adding a Parameter ==

src/main/scala/doobie/SelectingDataSection.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ package doobielib
99
import doobie.implicits._
1010
import DoobieUtils.CountryTable._
1111
import org.scalaexercises.definitions.Section
12-
import org.scalatest.{FlatSpec, Matchers}
12+
import org.scalatest.flatspec.AnyFlatSpec
13+
import org.scalatest.matchers.should.Matchers
1314

1415
/**
1516
* We are going to construct some programs that retrieve data from the database and stream it back,
@@ -52,7 +53,7 @@ import org.scalatest.{FlatSpec, Matchers}
5253
*
5354
* @param name selecting_data
5455
*/
55-
object SelectingDataSection extends FlatSpec with Matchers with Section {
56+
object SelectingDataSection extends AnyFlatSpec with Matchers with Section {
5657

5758
/**
5859
* == Getting info about the countries ==

src/main/scala/doobie/UpdatesSection.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import doobie._
1313
import doobie.implicits._
1414
import UpdatesSectionHelpers.Person
1515
import org.scalaexercises.definitions.Section
16-
import org.scalatest.{FlatSpec, Matchers}
16+
import org.scalatest.flatspec.AnyFlatSpec
17+
import org.scalatest.matchers.should.Matchers
1718

1819
/**
1920
* In this section we examine operations that modify data in the database, and ways to retrieve the
@@ -61,7 +62,7 @@ import org.scalatest.{FlatSpec, Matchers}
6162
*
6263
* @param name inserting_and_updating
6364
*/
64-
object UpdatesSection extends FlatSpec with Matchers with Section {
65+
object UpdatesSection extends AnyFlatSpec with Matchers with Section {
6566

6667
/**
6768
* Let's insert a new row by using the recently defined `insert1` method.

0 commit comments

Comments
 (0)