From afc27db8930b7002337368cdd7d381a73fe43b0f Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sun, 22 Oct 2023 11:28:58 +0700 Subject: [PATCH] Show less context on failure (fixes #26) --- ChangeLog.md | 4 ++++ cabal.project | 6 ++++++ src/Test/Hspec/Hedgehog.hs | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 61cbbb9..959799d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,9 @@ # Changelog for hspec-hedgehog +## 0.2.0.0 + - [#29](https://github.com/parsonsmatt/hspec-hedgehog/pull/29) @sol + - Show less context on failure. + ## 0.1.1.0 - [#30](https://github.com/parsonsmatt/hspec-hedgehog/pull/30) @sol - Show classification on success diff --git a/cabal.project b/cabal.project index 8bc4789..580092e 100644 --- a/cabal.project +++ b/cabal.project @@ -5,3 +5,9 @@ package hspec-hedgehog ghc-options: -Werror tests: True + +source-repository-package + type: git + location: https://github.com/sol/hedgehog + tag: 600abc71379c8642af15b8ddaa97f578bfa19a3b + subdir: hedgehog diff --git a/src/Test/Hspec/Hedgehog.hs b/src/Test/Hspec/Hedgehog.hs index a9bdf89..30c2d3d 100644 --- a/src/Test/Hspec/Hedgehog.hs +++ b/src/Test/Hspec/Hedgehog.hs @@ -203,7 +203,7 @@ instance (m ~ IO) => Example (a -> PropertyT m ()) where Just (rng, _) -> pure (uncurry Seed (unseedSMGen (coerce rng))) hedgeResult <- checkReport propConfig size seed (propertyTest prop) cb - let renderResult color = Hedge.renderResult color (Just "property") hedgeResult + let renderResult color = renderResultWith (Context 3) color (Just "property") hedgeResult case reportStatus hedgeResult of Failed FailureReport{..} -> do