hspec-expectations-lens-0.1.0.0: Hspec expectations for the lens stuff

Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Hspec.Expectations.Lens

Contents

Description

Hspec expectations for the lens stuff

Synopsis

Expectations

shouldHave :: Show s => s -> ((a -> Const Any a) -> s -> Const Any s) -> Expectation infixl 1 Source

x `shouldHave` l sets the expectation that Fold l has non-zero number of targets in x

shouldNotHave :: Show s => s -> ((a -> Const Any a) -> s -> Const Any s) -> Expectation infixl 1 Source

x `shouldNotHave` l sets the expectation that Fold l has zero targets in x

shouldView :: (Show s, Show a, Eq a) => s -> a -> ((a -> Const a a) -> s -> Const a s) -> Expectation infixl 1 Source

x `shouldView` y `through` l sets the expectation that you can see y in x though a Getter l

shouldPreview :: (Show s, Show a, Eq a) => s -> a -> ((a -> Const (First a) a) -> s -> Const (First a) s) -> Expectation infixl 1 Source

x `shouldPreview` y `through` l sets the expectation that you can list y in x first though a Fold l

shouldList :: (Show s, Show a, Eq a) => s -> [a] -> ((a -> Const (Endo [a]) a) -> s -> Const (Endo [a]) s) -> Expectation infixl 1 Source

x `shouldList` ys `through` l sets the expectation that you can list ys in x though a Fold l

through :: a -> a infixl 1 Source

A helper to fight parentheses

through ≡ id