Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Installation

Haskell

Choose the installation info of your platform from here.
For mac I recommend using ghcup to install to install ghc and cabal-install.

HSpec

Install HSpec with

cabal update && cabal install --lib hspec

Running the unit test

Navigate to the directory where the CodeKataSpec.hs test file is and run:

$ runhaskell CodeKataSpec.hs

It will fail with the following error message:

$ runhaskell CodeKataSpec.hs
Loaded package environment from {#your_environment}
Example Tests
should work with example tests FAILED [1]
Failures:
CodeKataSpec.hs:8:7: 1) Example Tests should work with example tests
expected: True
but got: False
To rerun use: --match "/Example Tests/should work with example tests/"
Randomized with seed 752281758
Finished in 0.0013 seconds
1 example, 1 failure

If you insert the following code block to CodeKata.hs:

moduleCodeKata (test) wheretest::String->Bool
test string =True

It will pass with:

$ runhaskell CodeKataSpec.hs
Loaded package environment from {#your_environment}
Example Tests
should work with example tests
Finished in 0.0003 seconds
1 example, 0 failures

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages