Created
July 6, 2020 04:00
-
-
Save justinhj/5c5a868df5b67576af0a66ab1c439c07 to your computer and use it in GitHub Desktop.
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 org.example | |
import zio.test._ | |
import ZioExample._ | |
import zio.test.environment.TestConsole | |
import zio.test.Assertion.{isEmpty,equalTo} | |
class ZioExampleSpec extends DefaultRunnableSpec { | |
def spec = suite("ZioExampleSpec")( | |
test("fail")(assert(List(1))(isEmpty)), | |
testM("helloApp correctly displays output") { | |
for { | |
_ <- helloApp | |
output <- TestConsole.output | |
} yield assert(output)(equalTo(Vector("Hello, World!\n"))) | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment