1
exercism fetch haskell zebra-puzzle

test/Tests.hs

1
2
3
4
5
6
7
8
9
10
11
12
import Test.Hspec        (Spec, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)

import ZebraPuzzle (Resident(..), Solution(..), solve)

main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs

specs :: Spec
specs = it "solve" $ solve `shouldBe` Solution { waterDrinker = Norwegian
                                               , zebraOwner   = Japanese  }