Skip to content

Instantly share code, notes, and snippets.

@dariathecracker
Last active June 4, 2020 11:41
Show Gist options
  • Save dariathecracker/279a084e4ba0d1308688dc8515e8d379 to your computer and use it in GitHub Desktop.
Save dariathecracker/279a084e4ba0d1308688dc8515e8d379 to your computer and use it in GitHub Desktop.
flatMap
import zio.test.mock.Expectation.{unit, value}
val mock: Managed[Nothing, MockConsole] = (
(MockConsole.getStrLn returns value("first")) *>
(MockConsole.getStrLn returns value("second")) *>
(MockConsole.putStrLn(equalTo("first & second")) returns unit)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment