Skip to content

Commit

Permalink
Show less context on failure (fixes #26)
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed May 2, 2024
1 parent 8ec73d7 commit 2f01cd3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ package hspec-hedgehog
ghc-options: -Werror

tests: True

source-repository-package
type: git
location: https://github.com/hedgehogqa/haskell-hedgehog
tag: c89ffd3461fb644d65faa8dce471d7600bf4501a
subdir: hedgehog
3 changes: 1 addition & 2 deletions src/Test/Hspec/Hedgehog.hs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ import Hedgehog.Internal.Property (DiscardLimit (..), Property (..),
TerminationCriteria (..),
TestCount (..), TestLimit (..))
import Hedgehog.Internal.Report hiding (renderResult)
import qualified Hedgehog.Internal.Report as Hedge
import Hedgehog.Internal.Runner (checkReport)
import qualified Hedgehog.Internal.Seed as Seed
import Hedgehog.Internal.Source (ColumnNo (..), LineNo (..),
Expand Down Expand Up @@ -203,7 +202,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
Expand Down

0 comments on commit 2f01cd3

Please sign in to comment.