Skip to content

Commit

Permalink
minor update to the doc to include cats-testkit-scalatest (#3049)
Browse files Browse the repository at this point in the history
  • Loading branch information
kailuowang authored Sep 10, 2019
1 parent 3c977a1 commit ccd712a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ functionality, you can pick-and-choose from amongst these modules
* [`kittens`](https://github.com/typelevel/kittens): automatic type class instance derivation for Cats and generic utility functions
* [`cats-tagless`](https://github.com/typelevel/cats-tagless): Utilities for tagless final encoded algebras
* [`cats-collections`](https://github.com/typelevel/cats-collections): Data structures which facilitate pure functional programming
* [`cats-testkit-scalatest`](https://github.com/typelevel/cats-testkit-scalatest): Cats testkit integration with Scalatest

Past release notes for Cats are available in [CHANGES.md](https://github.com/typelevel/cats/blob/master/CHANGES.md).
See [Cats 2019 roadmap](https://github.com/typelevel/cats/blob/master/ROADMAP_2019.md) for our plan for 2019.
Expand Down
7 changes: 5 additions & 2 deletions docs/src/main/tut/typeclasses/lawtesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ To make things easier, we'll also include the `scalacheck-shapeless` library in

```scala
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-laws" % "1.1.0" % Test,
"com.github.alexarchambault" %% "scalacheck-shapeless_1.13" % "1.1.6" % Test
"org.typelevel" %% "cats-laws" % "2.0.0" % Test,
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % "1.2.3" % Test
)
```

Expand Down Expand Up @@ -109,6 +109,9 @@ class TreeLawTests extends AnyFunSuite with Discipline {
* `Discipline` provides `checkAll`, and must be mixed into `AnyFunSuite`
* `arbitraries._` imports the `Arbitrary[Tree[_]]` instances needed to check the laws.

Alternatively, you can use the `CatsSuite` provided by [Cats-testkit-scalatest](https://github.com/typelevel/cats-testkit-scalatest),
which is the same `CatsSuite` used in Cats to test all instances.

Now when we run `test` in our sbt console, ScalaCheck will test if the `Functor` laws hold for our `Tree` type.
You should see something like this:

Expand Down

0 comments on commit ccd712a

Please sign in to comment.