Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add missing dependencies to cabal file #14

Merged
merged 3 commits into from

2 participants

@sol

No description provided.

@sol

BTW, CI for silently works now: http://travis-ci.org/#!/sol/silently

@sol

Well, except that we would never notice, if a test fails. I'll add an other commit to fix that.

@trystan trystan merged commit adb26b4 into trystan:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 13 deletions.
  1. +0 −5 .travis.yml
  2. +4 −7 silently.cabal
  3. +5 −1 test/NanoSpec.hs
View
5 .travis.yml
@@ -1,6 +1 @@
language: haskell
-
-install:
- - cabal update
- - cabal install hspec-shouldbe
- - cabal install
View
11 silently.cabal
@@ -26,8 +26,6 @@ Library
, directory
, deepseq
exposed-modules: System.IO.Silently
- exposed: True
- buildable: True
hs-source-dirs:
src
@@ -53,14 +51,11 @@ test-suite spec-specific
-Wall -Werror -threaded
hs-source-dirs:
test
-
- cpp-options: -DUSE_NANOSPEC
-
build-depends:
base
, silently
- , HUnit
, directory
+ , HUnit
, transformers
-- This tests the generic implementation, that should work on all platforms.
@@ -79,5 +74,7 @@ test-suite spec-generic
build-depends:
base
- , directory
, deepseq
+ , directory
+ , HUnit
+ , transformers
View
6 test/NanoSpec.hs
@@ -8,6 +8,7 @@ module NanoSpec where
import Control.Monad
import Control.Monad.Trans.Writer
import Test.HUnit
+import System.Exit
type Spec = Writer [Test] ()
@@ -21,7 +22,10 @@ it :: String -> Assertion -> Spec
it label = tell . return . TestLabel label . TestCase
hspec :: Spec -> IO ()
-hspec = void . runTestTT . TestList . execWriter
+hspec spec = do
+ r <- (runTestTT . TestList . execWriter) spec
+ when (errors r /= 0 || failures r /= 0)
+ exitFailure
-- Catchy combinators from https://github.com/sol/hspec-expectations
Something went wrong with that request. Please try again.