tasty-hspec 1.1.2 → 1.1.3
raw patch · 2 files changed
+10/−2 lines, 2 filesdep ~hspecdep ~hspec-core
Dependency ranges changed: hspec, hspec-core
Files
- Test/Tasty/Hspec.hs +9/−1
- tasty-hspec.cabal +1/−1
Test/Tasty/Hspec.hs view
@@ -4,6 +4,7 @@ module Test.Tasty.Hspec ( -- * Test testSpec+ , testSpecs -- * Options -- | === Re-exported from <https://hackage.haskell.org/package/tasty-smallcheck tasty-smallcheck> , SmallCheckDepth(..)@@ -38,7 +39,14 @@ -- | Create a <https://hackage.haskell.org/package/tasty tasty> 'T.TestTree' from an -- <https://hackage.haskell.org/package/hspec Hspec> 'H.Spec'. testSpec :: T.TestName -> H.Spec -> IO T.TestTree-testSpec name spec = T.testGroup name . map specTreeToTestTree <$> H.runSpecM spec+testSpec name spec = T.testGroup name <$> testSpecs spec++-- | Create a list of <https://hackage.haskell.org/package/tasty tasty>+-- 'T.TestTree' from a <https://hackage.haskell.org/package/hspec Hspec>+-- 'H.Spec' test. This returns the same tests as 'testSpec' but doesn't create+-- a <https://hackage.haskell.org/package/tasty tasty> test group from them.+testSpecs :: H.Spec -> IO [T.TestTree]+testSpecs spec = map specTreeToTestTree <$> H.runSpecM spec specTreeToTestTree :: H.SpecTree () -> T.TestTree specTreeToTestTree (H.Node name spec_trees) = T.testGroup name (map specTreeToTestTree spec_trees)
tasty-hspec.cabal view
@@ -1,5 +1,5 @@ name: tasty-hspec-version: 1.1.2+version: 1.1.3 synopsis: Hspec support for the Tasty test framework. description: Hspec support for the Tasty test framework.