packages feed

hspec-core 2.1.9 → 2.1.10

raw patch · 5 files changed

+18/−8 lines, 5 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Test.Hspec.Core.Spec: Location :: String -> Int -> Int -> LocationAccuracy -> Location
+ Test.Hspec.Core.Spec: Location :: FilePath -> Int -> Int -> LocationAccuracy -> Location
- Test.Hspec.Core.Spec: locationFile :: Location -> String
+ Test.Hspec.Core.Spec: locationFile :: Location -> FilePath

Files

hspec-core.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:             hspec-core-version:          2.1.9+version:          2.1.10 license:          MIT license-file:     LICENSE copyright:        (c) 2011-2015 Simon Hengel,
src/Test/Hspec/Compat.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} module Test.Hspec.Compat (-  showType+  getDefaultConcurrentJobs+, showType , showFullType , readMaybe , lookupEnv@@ -56,10 +57,18 @@  #if MIN_VERSION_base(4,4,0) import           Data.Typeable.Internal (tyConModule, tyConName)+import           Control.Concurrent #endif  #if !MIN_VERSION_base(4,6,0) import qualified Text.ParserCombinators.ReadP as P+#endif++getDefaultConcurrentJobs :: IO Int+#if MIN_VERSION_base(4,4,0)+getDefaultConcurrentJobs = getNumCapabilities+#else+getDefaultConcurrentJobs = return 1 #endif  #if !MIN_VERSION_base(4,6,0)
src/Test/Hspec/Core/Runner.hs view
@@ -131,7 +131,7 @@         qcArgs = configQuickCheckArgs c      jobsSem <- newQSem =<< case configConcurrentJobs c of-      Nothing -> getNumCapabilities+      Nothing -> getDefaultConcurrentJobs       Just maxJobs -> return maxJobs      useColor <- doesUseColor h c
src/Test/Hspec/Core/Tree.hs view
@@ -81,7 +81,7 @@  -- | @Location@ is used to represent source locations. data Location = Location {-  locationFile :: String+  locationFile :: FilePath , locationLine :: Int , locationColumn :: Int , locationAccuracy :: LocationAccuracy
test/Test/Hspec/Core/ExampleSpec.hs view
@@ -36,7 +36,8 @@         evaluateExample (23 `shouldBe` (23 :: Int)) `shouldReturn` H.Success        it "returns Fail if an expectation does not hold" $ do-        evaluateExample (23 `shouldBe` (42 :: Int)) `shouldReturn` H.Fail "expected: 42\n but got: 23"+        H.Fail msg <- evaluateExample (23 `shouldBe` (42 :: Int))+        msg `shouldEndWith` "expected: 42\n but got: 23"        it "propagates exceptions" $ do         evaluateExample (error "foobar" :: Expectation) `shouldThrow` errorCall "foobar"@@ -101,9 +102,9 @@       context "when used with shouldBe" $ do         it "shows what falsified it" $ do           H.Fail r <- evaluateExample $ property $ \ (x :: Int) (y :: Int) -> (x == 0 && y == 1) ==> 23 `shouldBe` (42 :: Int)-          r `shouldBe` intercalate "\n" [-              "Falsifiable (after 1 test): "-            , "expected: 42"+          r `shouldStartWith` "Falsifiable (after 1 test): \n"+          r `shouldEndWith` intercalate "\n" [+              "expected: 42"             , " but got: 23"             , "0"             , "1"