packages feed

hspec-core 2.5.4 → 2.5.5

raw patch · 17 files changed

+32/−25 lines, 17 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hspec-core.cabal view
@@ -1,11 +1,13 @@--- This file has been generated from package.yaml by hpack version 0.28.2.+cabal-version: >= 1.10++-- This file has been generated from package.yaml by hpack version 0.29.5. -- -- see: https://github.com/sol/hpack ----- hash: b098678af5a5999ea28d6152362006a70a50ebdcf343ec6707a508e3153a7cc2+-- hash: 18722f32fa5f70fec923fb16bae44075fdcc96cfab7622d6d9146d22fb7faed5  name:             hspec-core-version:          2.5.4+version:          2.5.5 license:          MIT license-file:     LICENSE copyright:        (c) 2011-2018 Simon Hengel,@@ -13,7 +15,6 @@                   (c) 2011 Greg Weber maintainer:       Simon Hengel <sol@typeful.net> build-type:       Simple-cabal-version:    >= 1.10 category:         Testing stability:        experimental bug-reports:      https://github.com/hspec/hspec/issues
src/Test/Hspec/Core/Compat.hs view
@@ -9,6 +9,7 @@  , module Prelude , module Control.Applicative+, module Control.Monad , module Data.Foldable , module Data.Traversable , module Data.Monoid@@ -22,6 +23,15 @@ ) where  import           Control.Applicative+import           Control.Monad hiding (+    mapM+  , mapM_+  , forM+  , forM_+  , msum+  , sequence+  , sequence_+  ) import           Data.Foldable import           Data.Traversable import           Data.Monoid
src/Test/Hspec/Core/Config.hs view
@@ -12,9 +12,9 @@ ) where  import           Prelude ()+import           Test.Hspec.Core.Compat  import           Control.Exception-import           Control.Monad import           Data.Maybe import           System.IO import           System.IO.Error@@ -24,7 +24,6 @@ import qualified Test.QuickCheck as QC  import           Test.Hspec.Core.Util-import           Test.Hspec.Core.Compat import           Test.Hspec.Core.Config.Options import           Test.Hspec.Core.FailureReport import           Test.Hspec.Core.QuickCheckUtil (mkGen)
src/Test/Hspec/Core/Config/Options.hs view
@@ -10,7 +10,6 @@ ) where  import           Prelude ()-import           Control.Monad import           Test.Hspec.Core.Compat  import           System.IO
src/Test/Hspec/Core/Example.hs view
@@ -113,7 +113,7 @@   type Arg (a -> Result) = a   evaluateExample example _params action _callback = do     ref <- newIORef (Result "" Success)-    action (writeIORef ref . example)+    action (evaluate . example >=> writeIORef ref)     readIORef ref  instance Example Bool where@@ -124,12 +124,12 @@   type Arg (a -> Bool) = a   evaluateExample p _params action _callback = do     ref <- newIORef (Result "" Success)-    action $ \a -> example a >>= writeIORef ref+    action (evaluate . example >=> writeIORef ref)     readIORef ref     where       example a-        | p a = return (Result "" Success)-        | otherwise = return (Result "" $ Failure Nothing NoReason)+        | p a = Result "" Success+        | otherwise = Result "" $ Failure Nothing NoReason  instance Example Expectation where   type Arg Expectation = ()
src/Test/Hspec/Core/FailureReport.hs view
@@ -5,14 +5,15 @@ , readFailureReport ) where +import           Prelude ()+import           Test.Hspec.Core.Compat+ #ifndef __GHCJS__ import           System.SetEnv import           Test.Hspec.Core.Util (safeTry) #endif-import           Control.Monad import           System.IO import           System.Directory-import           Test.Hspec.Core.Compat import           Test.Hspec.Core.Util (Path) import           Test.Hspec.Core.Config.Options (Config(..)) 
src/Test/Hspec/Core/Formatters.hs view
@@ -62,7 +62,6 @@ import           Test.Hspec.Core.Util import           Test.Hspec.Core.Spec (Location(..)) import           Text.Printf-import           Control.Monad (unless)  -- We use an explicit import list for "Test.Hspec.Formatters.Internal", to make -- sure, that we only use the public API to implement formatters.
src/Test/Hspec/Core/Formatters/Internal.hs view
@@ -16,7 +16,6 @@  import qualified System.IO as IO import           System.IO (Handle)-import           Control.Monad import           Control.Exception (AsyncException(..), bracket_, try, throwIO) import           System.Console.ANSI import           Control.Monad.Trans.State hiding (state, gets, modify)
src/Test/Hspec/Core/Runner.hs view
@@ -25,7 +25,6 @@ import           Prelude () import           Test.Hspec.Core.Compat -import           Control.Monad import           Data.Maybe import           System.IO import           System.Environment (getProgName, getArgs, withArgs)
src/Test/Hspec/Core/Runner/Eval.hs view
@@ -23,7 +23,6 @@ import           Test.Hspec.Core.Compat hiding (Monad) import qualified Test.Hspec.Core.Compat as M -import           Control.Monad (unless, when) import qualified Control.Exception as E import           Control.Concurrent import           Control.Concurrent.Async hiding (cancel)
src/Test/Hspec/Core/Timer.hs view
@@ -1,11 +1,12 @@ module Test.Hspec.Core.Timer (withTimer) where +import           Prelude ()+import           Test.Hspec.Core.Compat+ import           Control.Exception-import           Control.Monad import           Control.Concurrent.Async  import           Test.Hspec.Core.Clock-import           Test.Hspec.Core.Compat  withTimer :: Seconds -> (IO Bool -> IO a) -> IO a withTimer delay action = do
src/Test/Hspec/Core/Tree.hs view
@@ -81,5 +81,5 @@  defaultDescription :: HasCallStack => Maybe String defaultDescription = case reverse callStack of-  (_, loc) : _ -> Just (srcLocModule loc ++ ":" ++ show (srcLocStartLine loc) ++ ":" ++ show (srcLocStartCol loc))+  (_, loc) : _ -> Just (srcLocModule loc ++ "[" ++ show (srcLocStartLine loc) ++ ":" ++ show (srcLocStartCol loc) ++ "]")   _ -> Nothing
test/Helper.hs view
@@ -30,7 +30,6 @@  import           Data.List import           Data.Char-import           Control.Monad (guard) import           System.Environment (withArgs, getEnvironment) import           System.Exit import qualified Control.Exception as E
test/Test/Hspec/Core/Config/OptionsSpec.hs view
@@ -3,7 +3,6 @@ import           Prelude () import           Helper -import           Control.Monad import           System.Exit  import qualified Test.Hspec.Core.Config.Options as Options
test/Test/Hspec/Core/ExampleSpec.hs view
@@ -61,6 +61,9 @@    describe "evaluateExample" $ do     context "for Result" $ do+      it "propagates exceptions" $ do+        evaluateExample (error "foobar" :: Result) `shouldThrow` errorCall "foobar"+       it "runs around-action" $ do         ref <- newIORef (0 :: Int)         let action :: IO () -> IO ()
test/Test/Hspec/Core/RunnerSpec.hs view
@@ -13,7 +13,6 @@ import           Helper  import           System.IO (stderr)-import           Control.Monad (replicateM_) import           System.Environment (withArgs, withProgName, getArgs) import           System.Exit import           Control.Concurrent
test/Test/Hspec/Core/SpecSpec.hs view
@@ -27,7 +27,7 @@       it "uses a default description" $ do         [Node d _] <- runSpecM (H.describe "" (pure ())) #if MIN_VERSION_base(4,8,1)-        d `shouldBe` "Test.Hspec.Core.SpecSpec:" ++ show (__LINE__ - 2 :: Int) ++ ":33"+        d `shouldBe` "Test.Hspec.Core.SpecSpec[" ++ show (__LINE__ - 2 :: Int) ++ ":33]" #else         d `shouldBe` "(no description given)" #endif@@ -62,7 +62,7 @@       it "uses a default description" $ do         [Leaf item] <- runSpecM (H.it "" True) #if MIN_VERSION_base(4,8,1)-        itemRequirement item `shouldBe` "Test.Hspec.Core.SpecSpec:" ++ show (__LINE__ - 2 :: Int) ++ ":34"+        itemRequirement item `shouldBe` "Test.Hspec.Core.SpecSpec[" ++ show (__LINE__ - 2 :: Int) ++ ":34]" #else         itemRequirement item `shouldBe` "(unspecified behavior)" #endif