From 252871fea93813f31af46ee0b823199e9d913f3a Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Tue, 27 Nov 2012 20:56:58 +0100 Subject: [PATCH] Fix deprecation warnings --- yesod-test/Yesod/Test.hs | 5 +++-- yesod-test/yesod-test.cabal | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/yesod-test/Yesod/Test.hs b/yesod-test/Yesod/Test.hs index f41b4834..64c3a691 100644 --- a/yesod-test/Yesod/Test.hs +++ b/yesod-test/Yesod/Test.hs @@ -81,6 +81,7 @@ where import qualified Test.Hspec () import qualified Test.Hspec.Core as Core +import qualified Test.Hspec.Runner as Runner import qualified Data.List as DL import qualified Data.Maybe as DY import qualified Data.ByteString.Char8 as BS8 @@ -108,7 +109,7 @@ import Data.Conduit.Pool (Pool) import Control.Monad.Trans.Control (MonadBaseControl) -- | The state used in 'describe' to build a list of specs -data SpecsData conn = SpecsData Application (Pool conn) [Core.Spec] +data SpecsData conn = SpecsData Application (Pool conn) [Core.SpecTree] -- | The specs state monad is where 'describe' runs. -- parameterized by a database connection. @@ -156,7 +157,7 @@ type CookieValue = ByteString runTests :: Application -> Pool conn -> SpecsConn conn -> IO () runTests app connection specsDef = do (SpecsData _ _ specs) <- ST.execStateT specsDef (SpecsData app connection []) - Core.hspec specs + (Runner.hspec . Core.fromSpecList) specs -- | Start describing a Tests suite keeping cookies and a reference to the tested 'Application' -- and 'ConnectionPool' diff --git a/yesod-test/yesod-test.cabal b/yesod-test/yesod-test.cabal index 2e5b732e..a3b7cf25 100644 --- a/yesod-test/yesod-test.cabal +++ b/yesod-test/yesod-test.cabal @@ -23,7 +23,7 @@ library , network >= 2.2 , http-types >= 0.7 && < 0.8 , HUnit >= 1.2 && < 1.3 - , hspec >= 1.3 + , hspec >= 1.4 , bytestring >= 0.9 , case-insensitive >= 0.2 , text