Last active
June 4, 2020 12:11
-
-
Save dariathecracker/c5ce542f934b5aa8e7a3c2daf9cfb238 to your computer and use it in GitHub Desktop.
Tic-Tac-Toe Game
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ioleo.tictactoe | |
import zio.test.{assert, suite, testM, DefaultRunnableSpec} | |
import zio.test.environment.TestConsole | |
import zio.test.Assertion.equalTo | |
object TicTacToeSpec extends DefaultRunnableSpec( | |
suite("TicTacToe")( | |
testM("prints to console") { | |
for { | |
test <- TestConsole.makeTest(TestConsole.DefaultData) | |
_ <- TicTacToe.program.provide(new TestConsole { | |
val console = test | |
}) | |
out <- test.output | |
} yield assert(out, equalTo(Vector("TicTacToe game!\n"))) | |
} | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment