【Haskell】stack と HSpec
stack には HSpec 用のテンプレートがある。
どんなテンプレートがあるかは
stack templates
で確認できる。自分の環境では
hspec - a testing framework for Haskell inspired by the Ruby library RSpec
というのが含まれている。これを使ってプロジェクトを作るには
stack new hello hspec
とすればよい。hello/ というディレクトリが作られている。
hello
├── LICENSE
├── README.md
├── Setup.hs
├── app
│ └── Main.hs
├── hello.cabal
├── src
│ └── Data
│ └── String
│ └── Strip.hs
├── stack.yaml
└── test
├── Data
│ └── String
│ └── StripSpec.hs
└── Spec.hs
7 directories, 9 files