hspec-jenkins 0.1.0 → 0.1.1
raw patch · 4 files changed
+10/−13 lines, 4 files
Files
- example/example.cabal +1/−1
- example/test/test.hs +1/−1
- hspec-jenkins.cabal +1/−1
- lib/Test/Hspec/Formatters/Jenkins.hs +7/−10
example/example.cabal view
@@ -15,7 +15,7 @@ build-depends: base == 4.* , example- , hspec+ , hspec >= 1.5.0 , hspec-jenkins hs-source-dirs: test ghc-options: -Wall -W
example/test/test.hs view
@@ -37,6 +37,6 @@ exn `shouldThrow` anyIOException describe "foo" $ do it "bar" $ do- pending "baz"+ pendingWith "baz" it "hoge" $ do pending
hspec-jenkins.cabal view
@@ -1,5 +1,5 @@ name: hspec-jenkins-version: 0.1.0+version: 0.1.1 synopsis: Jenkins-friendly XML formatter for Hspec description: Jenkins-friendly XML formatter for Hspec author: Kohei Suzuki
lib/Test/Hspec/Formatters/Jenkins.hs view
@@ -19,7 +19,7 @@ An example project is located in @example@ directory. -} -{-# LANGUAGE RecordWildCards, OverloadedStrings #-}+{-# LANGUAGE OverloadedStrings #-} module Test.Hspec.Formatters.Jenkins (xmlFormatter) where import Data.List (intercalate) import Test.Hspec.Formatters@@ -41,26 +41,23 @@ -- | Format Hspec result to Jenkins-friendly XML. xmlFormatter :: Formatter-xmlFormatter = Formatter{..}- where+xmlFormatter = silent { headerFormatter = do writeLine "<?xml version='1.0' encoding='UTF-8'?>" writeLine "<testsuite>"- exampleGroupStarted _ _ _ = return ()- exampleGroupDone = return ()- exampleSucceeded path = do+ , exampleSucceeded = \path -> do writeLine $ renderMarkup $ testcase path ""- exampleFailed path err = do+ , exampleFailed = \path err -> do writeLine $ renderMarkup $ testcase path $ failure ! message (either formatException id err) $ ""- examplePending path mdesc = do+ , examplePending = \path mdesc -> do writeLine $ renderMarkup $ testcase path $ case mdesc of Just desc -> skipped ! message desc $ "" Nothing -> skipped ""- failedFormatter = return ()- footerFormatter = do+ , footerFormatter = do writeLine "</testsuite>"+ }