| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Expect.Task
Description
A library to create Expecations for Tasks.
Documentation
check :: Expectation -> Task Failure () Source #
Check an expectation in the middle of a do block.
task "Laundry gets done" <| do
weightInKgs <- clothesInWasher
check (weightInKgs |> Expect.atMost 8)
soapInWasher
startMachineandCheck :: (a -> Expectation) -> Task Failure a -> Task Failure a Source #
Check a task returns an expected value, than pass that value on.
task "Greetings are friendly" <| do
getGreeting
|> andCheck (Expect.equal "Hi!")succeeds :: Show err => Task err a -> Task Failure a Source #
Check a task succeeds.
task "solve rubicskube" <| do
solveRubicsKube
|> succeeds