Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up #246

Merged
merged 2 commits into from
Apr 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
package laserdisc.fs2

import java.io.{ByteArrayOutputStream, PrintStream}
import java.util.concurrent.ForkJoinPool

import cats.effect.{Concurrent, ContextShift, IO, Timer}
import cats.effect.{ContextShift, IO, Timer}
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike

import scala.concurrent.ExecutionContext
import scala.concurrent.ExecutionContext.fromExecutor

final class ReadmeExampleSpec extends AnyWordSpecLike with Matchers {

private[this] val ec: ExecutionContext = fromExecutor(new ForkJoinPool())

private[this] implicit val timer: Timer[IO] = IO.timer(ec)
private[this] implicit val contextShift: ContextShift[IO] = IO.contextShift(ec)
private[this] implicit val concurrent: Concurrent[IO] = IO.ioConcurrentEffect

private[this] def capturedConsoleOutOf(aWrite: IO[Unit]): String = {
val lowerStream = new ByteArrayOutputStream()
Expand All @@ -31,6 +29,7 @@ final class ReadmeExampleSpec extends AnyWordSpecLike with Matchers {
import laserdisc._
import laserdisc.all._
import laserdisc.auto._
import laserdisc.fs2._
import log.effect.LogWriter
import log.effect.fs2.SyncLogWriter

Expand Down