| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Tasty.Hspec
Description
Tests
Options
data TreatPendingAs Source #
How to treat hspec pending tests.
tasty does not have the concept of pending tests, so we must map them
to either successes or failures. By default, they are treated as failures.
Set via the command line flag --treat-pending-as (success|failure).
Constructors
| TreatPendingAsFailure | Default. |
| TreatPendingAsSuccess |
Instances
| IsOption TreatPendingAs Source # | |
Defined in Test.Tasty.Hspec | |
Examples
The simplest usage of this library involves first creating a TestTree in IO, then running it with
defaultMain.
main = do spec <-testSpec"spec" mySpecdefaultMain(testGroup"tests" [spec])
You can treat an pending/pendingWith test as a success instead of a failure (the default):
main = do spec <-testSpec"spec" mySpecdefaultMain(localOptionTreatPendingAsSuccess(testGroup"tests" [spec]))
If you don't do any IO during Spec creation, or the IO need
not be performed at any particular time relative to other IO actions, it's
perfectly fine to use unsafePerformIO.
main = dodefaultMain(testGroup"tests" [unsafePerformIO (testSpec"spec" mySpec)])