diff --git a/bin/test b/bin/test index 1af41c2..7d742d6 100755 --- a/bin/test +++ b/bin/test @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -xe -exec nix develop -c ghcid -c "cabal repl test:tests" +exec nix develop -c ghcid -c "cabal repl test:tests" -T :main diff --git a/haskell-template.cabal b/haskell-template.cabal index cf46712..5d398ba 100644 --- a/haskell-template.cabal +++ b/haskell-template.cabal @@ -91,23 +91,17 @@ common shared , time , with-utf8 + hs-source-dirs: src + other-modules: Lib + executable haskell-template import: shared main-is: Main.hs - hs-source-dirs: src default-language: Haskell2010 - other-modules: Lib - -library - import: shared - exposed-modules: Lib - hs-source-dirs: src test-suite tests import: shared - main-is: Main.hs + main-is: Spec.hs type: exitcode-stdio-1.0 hs-source-dirs: tests - build-depends: - , haskell-template - , hspec + build-depends: hspec diff --git a/tests/Main.hs b/tests/Spec.hs similarity index 100% rename from tests/Main.hs rename to tests/Spec.hs