Skip to content

Commit

Permalink
configure hpec
Browse files Browse the repository at this point in the history
  • Loading branch information
autotaker committed Dec 31, 2020
1 parent 224e8bf commit c81d5aa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
10 changes: 8 additions & 2 deletions start-haskell.cabal
Expand Up @@ -21,6 +21,10 @@ common shared-properties
build-depends: base ^>=4.13.0.0
default-language: Haskell2010

common test-depends
build-depends: hspec ^>= 2.7.4
build-tool-depends: hspec-discover:hspec-discover

library
import: shared-properties
exposed-modules: MyLib
Expand All @@ -37,7 +41,9 @@ executable start-haskell
hs-source-dirs: app

test-suite start-haskell-test
import: shared-properties
import: shared-properties, test-depends
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: MyLibTest.hs
main-is: Spec.hs
other-modules: MyLibSpec
build-depends: start-haskell
8 changes: 8 additions & 0 deletions test/MyLibSpec.hs
@@ -0,0 +1,8 @@
module MyLibSpec where

import Test.Hspec (Spec, describe, it, shouldBe)

spec :: Spec
spec = describe "trivial" $ do
it "True should be True" $ do
True `shouldBe` True
4 changes: 0 additions & 4 deletions test/MyLibTest.hs

This file was deleted.

1 change: 1 addition & 0 deletions test/Spec.hs
@@ -0,0 +1 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}

0 comments on commit c81d5aa

Please sign in to comment.