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

Add syntax support for Scalatest "GivenWhenThen" #282

Open
wants to merge 1 commit into
base: series/1.x
Choose a base branch
from

Conversation

AdamJKing
Copy link

A small wrapper for Scala-test's GivenWhenThen trait. This would help improve the ergonomics when writing BDD tests for effectful code. For example:

for {
  _ <- Resource.eval(IO(Given("given")))
  _ <- Resource.eval(IO(When("when")))
  _ <- Resource.eval(IO(Then("then")))
} yield ()

This is very noisy and makes reading BDD tests more difficult compared to...

for {
  _ <- Given("given")
  _ <- When("when")
  _ <- Then("then")
} yield ()

...where the intention is a lot clearer.

@armanbilge
Copy link
Member

@typelevel/cats-effect-testing bump? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants