hspec 2.11.15 → 2.11.16
raw patch · 5 files changed
+25/−7 lines, 5 filesdep ~hspec-coredep ~hspec-discoverPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: hspec-core, hspec-discover
API changes (from Hackage documentation)
- Test.Hspec: --
- Test.Hspec: -- <a>Arg</a> is <tt>()</tt>, no argument is required and the
- Test.Hspec: -- <a>Example</a> can be run as-is.
- Test.Hspec: -- <a>Test.Hspec.Core.Hooks</a> such as <a>around</a>, <a>before</a>,
- Test.Hspec: -- <a>mapSubject</a> and similar.
- Test.Hspec: -- <tt><a>SpecWith</a> a</tt>, which cannot be executed without turning
- Test.Hspec: -- The value of <a>Arg</a> is the difference between <a>Spec</a> (aka
- Test.Hspec: -- To supply an argument to examples, use the functions in
- Test.Hspec: -- it into <a>Spec</a> first.
- Test.Hspec: -- | The argument type that is needed to run this <a>Example</a>. If
- Test.Hspec: type Arg e = ();
- Test.Hspec: }
- Test.Hspec.Discover: class IsFormatter a
- Test.Hspec.Discover: describe :: HasCallStack => String -> SpecWith a -> SpecWith a
- Test.Hspec.Discover: hspec :: Spec -> IO ()
- Test.Hspec.Discover: hspecWithFormatter :: IsFormatter a => a -> Spec -> IO ()
- Test.Hspec.Discover: instance Test.Hspec.Discover.IsFormatter (GHC.Types.IO Test.Hspec.Core.Formatters.V1.Monad.Formatter)
- Test.Hspec.Discover: instance Test.Hspec.Discover.IsFormatter Test.Hspec.Core.Formatters.V1.Monad.Formatter
- Test.Hspec.Discover: postProcessSpec :: FilePath -> Spec -> Spec
- Test.Hspec.Discover: toFormatter :: IsFormatter a => a -> IO Formatter
- Test.Hspec.Discover: type Spec = SpecWith ()
+ Test.Hspec: type family Arg e
- Test.Hspec: class Example e where {
+ Test.Hspec: class Example e
Files
- CHANGES.markdown +3/−0
- hspec.cabal +8/−5
- src/Test/Hspec.hs +7/−1
- src/Test/Hspec/Discover.hs +6/−0
- version.yaml +1/−1
CHANGES.markdown view
@@ -1,3 +1,6 @@+## Changes in 2.11.16 (2025-12-12)+ - Add support for MicroHs+ ## Changes in 2.11.15 (2025-12-08) - Remove redundant `tf-random` dependency
hspec.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.38.3.+-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: hspec-version: 2.11.15+version: 2.11.16 license: MIT license-file: LICENSE copyright: (c) 2011-2025 Simon Hengel,@@ -46,15 +46,18 @@ build-depends: QuickCheck >=2.12 , base ==4.*- , hspec-core ==2.11.15- , hspec-discover ==2.11.15+ , hspec-core ==2.11.16+ , hspec-discover ==2.11.16 , hspec-expectations ==0.8.4.* exposed-modules: Test.Hspec Test.Hspec.Discover- Test.Hspec.Formatters Test.Hspec.QuickCheck Test.Hspec.Runner other-modules: Paths_hspec default-language: Haskell2010+ if impl(ghc)+ exposed-modules:+ Test.Hspec.Formatters+ cpp-options: -DENABLE_SPEC_HOOKS -DENABLE_SPEC_HOOK_ARGS -DENABLE_LEGACY_V1_FORMATTERS
src/Test/Hspec.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | -- Stability: stable --@@ -10,7 +11,8 @@ -- * Types Spec , SpecWith-, Example(Arg)+, Example+, Arg -- * Setting expectations , module Test.Hspec.Expectations@@ -49,6 +51,7 @@ , fdescribe , fcontext +#ifdef ENABLE_SPEC_HOOKS -- * Hooks , ActionWith , before@@ -69,13 +72,16 @@ , aroundAllWith , mapSubject , ignoreSubject+#endif -- * Running a spec , hspec ) where import Test.Hspec.Core.Spec+#ifdef ENABLE_SPEC_HOOKS import Test.Hspec.Core.Hooks+#endif import Test.Hspec.Runner import Test.Hspec.Expectations
src/Test/Hspec/Discover.hs view
@@ -1,12 +1,16 @@ {-# OPTIONS_GHC -fno-warn-deprecations #-}+{-# OPTIONS_HADDOCK hide #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} module Test.Hspec.Discover {-# WARNING "This module is used by @hspec-discover@. It is not part of the public API and may change at any time." #-} ( Spec , hspec+#ifdef ENABLE_LEGACY_V1_FORMATTERS , IsFormatter (..) , hspecWithFormatter+#endif , postProcessSpec , describe , module Prelude@@ -14,6 +18,7 @@ import Test.Hspec.Core.Spec import Test.Hspec.Core.Runner+#ifdef ENABLE_LEGACY_V1_FORMATTERS import Test.Hspec.Core.Formatters.V1 class IsFormatter a where@@ -29,6 +34,7 @@ hspecWithFormatter formatter spec = do f <- toFormatter formatter hspecWith defaultConfig {configFormatter = Just f} spec+#endif postProcessSpec :: FilePath -> Spec -> Spec postProcessSpec _ = id
version.yaml view
@@ -1,4 +1,4 @@-version: &version 2.11.15+version: &version 2.11.16 synopsis: A Testing Framework for Haskell author: Simon Hengel <sol@typeful.net> maintainer: Simon Hengel <sol@typeful.net>