hspec-expectations-0.6.1.1: Catchy combinators for HUnit

Safe HaskellSafe-Inferred
LanguageHaskell98

Test.Hspec.Expectations.Contrib

Contents

Description

Experimental combinators, that may become part of the main distribution, if they turn out to be useful for a wider audience.

Synopsis

Additional combinators for setting expectations

shouldNotBe :: (Show a, Eq a) => a -> a -> Expectation infix 1 Source

actual `shouldNotBe` notExpected sets the expectation that actual is not equal to notExpected

shouldNotSatisfy :: Show a => a -> (a -> Bool) -> Expectation infix 1 Source

v `shouldNotSatisfy` p sets the expectation that p v is False.

shouldNotReturn :: (Show a, Eq a) => IO a -> a -> Expectation infix 1 Source

action `shouldNotReturn` notExpected sets the expectation that action does not return notExpected.

shouldNotContain :: (Show a, Eq a) => [a] -> [a] -> Expectation infix 1 Source

list `shouldNotContain` sublist sets the expectation that sublist is not contained anywhere in the second.

Predicates

(useful in combination with shouldSatisfy)