packages feed

hspec-expectations-match-0.2.0.0: package.yaml

name: hspec-expectations-match
version: 0.2.0.0
category: Testing
synopsis: An hspec expectation that asserts a value matches a pattern.
description: |
  This package provides expectations for use with @hspec@ that use Template
  Haskell to assert that a value matches a particular pattern.
  The primary expectation is 'shouldMatch':

  >>> $([|Just True|] `shouldMatch` [p|Just _|])
  >>> $([|Nothing|] `shouldMatch` [p|Just _|])

  Additionally, any bindings created by the pattern will be returned if the
  pattern is successfully matched, making it easier to extract the result of
  some assertion and use it to make further assertions.

  >>> $([|Just True|] `shouldMatch` [p|Just x|])
  True
  >>> $([|[1, 2]|] `shouldMatch` [p|[x, y]|])
  (1, 2)

copyright: 2017 CJ Affiliate by Conversant
license: ISC
author: Alexis King <lexi.lambda@gmail.com>
maintainer: Alexis King <lexi.lambda@gmail.com>
github: cjdev/hspec-expectations-match

extra-source-files:
- CHANGELOG.md
- package.yaml
- README.md
- stack.yaml

ghc-options: -Wall
default-extensions:
- ApplicativeDo
- ConstraintKinds
- DefaultSignatures
- DeriveGeneric
- ExistentialQuantification
- FlexibleContexts
- FlexibleInstances
- FunctionalDependencies
- GADTs
- GeneralizedNewtypeDeriving
- KindSignatures
- LambdaCase
- MultiParamTypeClasses
- NamedFieldPuns
- OverloadedStrings
- RankNTypes
- ScopedTypeVariables
- StandaloneDeriving
- TupleSections
- TypeApplications
- TypeOperators

library:
  dependencies:
  - base >= 4.9 && < 5
  - hspec-expectations >= 0.3.2 && < 1
  - template-haskell >= 2.11 && < 2.13
  - transformers-base < 1
  source-dirs: src

tests:
  hspec-expectations-th-test-suite:
    dependencies:
    - base
    - hspec
    - hspec-expectations-match
    ghc-options:
    - -rtsopts
    - -threaded
    - -with-rtsopts=-N
    main: Main.hs
    source-dirs: test