Skip to content

Instantly share code, notes, and snippets.

@prikhi
Created October 19, 2017 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prikhi/6e544ba72e8fa1de04a7865a060dd818 to your computer and use it in GitHub Desktop.
Save prikhi/6e544ba72e8fa1de04a7865a060dd818 to your computer and use it in GitHub Desktop.
roelof hspec
name: eitherMonad
version: 0.1.0.0
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
test-suite eitherMonad-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, hspec
, hspec-checkers
, checkers
, QuickCheck
other-modules: LawsCheckingSpec
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
module LawsCheckingSpec (spec) where
import Test.Hspec
spec :: Spec
spec =
describe "laws testing" $
it "1 + 1 == 2" $
1 + 1 `shouldBe` (2 :: Integer)
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
$ stack clean; stack test [16:54:28]
eitherMonad-0.1.0.0: configure (test)
Configuring eitherMonad-0.1.0.0...
eitherMonad-0.1.0.0: build (test)
Preprocessing test suite 'eitherMonad-test' for eitherMonad-0.1.0.0...
[1 of 2] Compiling LawsCheckingSpec ( test/LawsCheckingSpec.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/eitherMonad-test/eitherMonad-test-tmp/LawsCheckingSpec.o )
[2 of 2] Compiling Main ( test/Spec.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/eitherMonad-test/eitherMonad-test-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/eitherMonad-test/eitherMonad-test ...
eitherMonad-0.1.0.0: test (suite: eitherMonad-test)
Progress: 1/2
LawsChecking
laws testing
1 + 1 == 2
Finished in 0.0001 seconds
1 example, 0 failures
Completed 2 action(s).
.
├── eitherMonad.cabal
├── README.md
├── stack.yaml
└── test
├── LawsCheckingSpec.hs
└── Spec.hs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment