hspec-expectations 0.8.3 → 0.8.4
raw patch · 3 files changed
+4/−4 lines, 3 files
Files
- hspec-expectations.cabal +1/−1
- src/Test/Hspec/Expectations.hs +2/−2
- test/Test/Hspec/ExpectationsSpec.hs +1/−1
hspec-expectations.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hspec-expectations-version: 0.8.3+version: 0.8.4 synopsis: Catchy combinators for HUnit description: Catchy combinators for HUnit: <https://github.com/hspec/hspec-expectations#readme> bug-reports: https://github.com/hspec/hspec-expectations/issues
src/Test/Hspec/Expectations.hs view
@@ -171,9 +171,9 @@ "did not get expected exception: " ++ exceptionType Left e -> (`expectTrue` p e) $- "predicate failed on expected exception: " ++ exceptionType ++ " (" ++ show e ++ ")"+ "predicate failed on expected exception: " ++ exceptionType ++ "\n" ++ show e where- -- a string repsentation of the expected exception's type+ -- a string representation of the expected exception's type exceptionType = (show . typeOf . instanceOf) p where instanceOf :: Selector a -> a
test/Test/Hspec/ExpectationsSpec.hs view
@@ -96,7 +96,7 @@ error "foobar" `shouldThrow` errorCall "foobar" it "fails, if a required specific exception is not thrown" $ do- (throwIO Overflow `shouldThrow` (== DivideByZero)) `shouldThrow` expectationFailed (Reason "predicate failed on expected exception: ArithException (arithmetic overflow)")+ (throwIO Overflow `shouldThrow` (== DivideByZero)) `shouldThrow` expectationFailed (Reason "predicate failed on expected exception: ArithException\narithmetic overflow") it "fails, if any exception is required, but no exception is thrown" $ do (return () `shouldThrow` anyException) `shouldThrow` expectationFailed (Reason "did not get expected exception: SomeException")