packages feed

hspec-discover 2.10.2 → 2.10.3

raw patch · 4 files changed

+21/−17 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hspec-discover.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:             hspec-discover-version:          2.10.2+version:          2.10.3 license:          MIT license-file:     LICENSE copyright:        (c) 2012-2022 Simon Hengel
src/Test/Hspec/Discover/Run.hs view
@@ -61,8 +61,8 @@ mkSpecModule src conf nodes =   ( "{-# LINE 1 " . shows src . " #-}\n"   . showString "{-# LANGUAGE NoImplicitPrelude #-}\n"-  . showString "{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}\n"-  . showString ("module " ++ moduleName ++ exports ++ " where\n")+  . showString "{-# OPTIONS_GHC -w -Wall -fno-warn-warnings-deprecations #-}\n"+  . showString ("module " ++ moduleName src conf ++" where\n")   . importList nodes   . showString "import Test.Hspec.Discover\n"   . maybe driver driverWithFormatter (configFormatter conf)@@ -71,11 +71,15 @@   . formatSpecs nodes   ) "\n"   where-    ifNoMain x y = if configNoMain conf then x else y-    defaultModuleName = ifNoMain (pathToModule src) "Main"-    moduleName = fromMaybe defaultModuleName (configModuleName conf)-    exports = " (" ++ ifNoMain "" "main, " ++ "spec)"-    driver = showString $ ifNoMain "" "main :: IO ()\nmain = hspec spec\n"+    driver =+        case configNoMain conf of+          False ->+              showString "main :: IO ()\n"+            . showString "main = hspec spec\n"+          True -> ""++moduleName :: FilePath -> Config -> String+moduleName src conf = fromMaybe (if configNoMain conf then pathToModule src else "Main") (configModuleName conf)  -- | Derive module name from specified path. pathToModule :: FilePath -> String
test/Test/Hspec/Discover/RunSpec.hs view
@@ -17,8 +17,8 @@       readFile "out" `shouldReturn` unlines [           "{-# LINE 1 \"test/Spec.hs\" #-}"         , "{-# LANGUAGE NoImplicitPrelude #-}"-        , "{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}"-        , "module Main (main, spec) where"+        , "{-# OPTIONS_GHC -w -Wall -fno-warn-warnings-deprecations #-}"+        , "module Main where"         , "import qualified FooSpec"         , "import qualified Foo.BarSpec"         , "import qualified Foo.Bar.BazSpec"@@ -41,8 +41,8 @@       readFile "out" `shouldReturn` unlines [           "{-# LINE 1 \"test/Spec.hs\" #-}"         , "{-# LANGUAGE NoImplicitPrelude #-}"-        , "{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}"-        , "module Spec (spec) where"+        , "{-# OPTIONS_GHC -w -Wall -fno-warn-warnings-deprecations #-}"+        , "module Spec where"         , "import qualified FooSpec"         , "import qualified Foo.BarSpec"         , "import qualified Foo.Bar.BazSpec"@@ -65,8 +65,8 @@       readFile "out" `shouldReturn` unlines [           "{-# LINE 1 \"test/Spec.hs\" #-}"         , "{-# LANGUAGE NoImplicitPrelude #-}"-        , "{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}"-        , "module Main (main, spec) where"+        , "{-# OPTIONS_GHC -w -Wall -fno-warn-warnings-deprecations #-}"+        , "module Main where"         , "import qualified SpecHook"         , "import qualified FooSpec"         , "import qualified Foo.SpecHook"@@ -89,8 +89,8 @@       readFile "out" `shouldReturn` unlines [           "{-# LINE 1 \"test/Spec.hs\" #-}"         , "{-# LANGUAGE NoImplicitPrelude #-}"-        , "{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}"-        , "module Main (main, spec) where"+        , "{-# OPTIONS_GHC -w -Wall -fno-warn-warnings-deprecations #-}"+        , "module Main where"         , "import Test.Hspec.Discover"         , "main :: IO ()"         , "main = hspec spec"
version.yaml view
@@ -1,1 +1,1 @@-&version 2.10.2+&version 2.10.3