diff --git a/yesod-test/test/main.hs b/yesod-test/test/main.hs index e5031155..84185933 100644 --- a/yesod-test/test/main.hs +++ b/yesod-test/test/main.hs @@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP #-} import Test.HUnit hiding (Test) import Test.Hspec.Monadic import Test.Hspec.HUnit () @@ -15,7 +16,13 @@ findBySelector_ x = either error id . findBySelector x parseHtml_ = either error id . parseHtml main :: IO () -main = hspecX $ do +main = +#if MIN_VERSION_hspec(1,2,0) + hspec +#else + hspecX +#endif + $ do describe "CSS selector parsing" $ do it "elements" $ parseQuery_ "strong" @?= [[DeepChildren [ByTagName "strong"]]] it "child elements" $ parseQuery_ "strong > i" @?= [[DeepChildren [ByTagName "strong"], DirectChildren [ByTagName "i"]]] diff --git a/yesod-test/yesod-test.cabal b/yesod-test/yesod-test.cabal index 1d4805c5..424ed6d7 100644 --- a/yesod-test/yesod-test.cabal +++ b/yesod-test/yesod-test.cabal @@ -1,5 +1,5 @@ name: yesod-test -version: 0.2.0.6 +version: 0.2.1 license: MIT license-file: LICENSE author: Nubis @@ -29,7 +29,7 @@ library , network >= 2.2 && < 2.4 , http-types >= 0.6 && < 0.7 , HUnit >= 1.2 && < 1.3 - , hspec >= 1.1 && < 1.2 + , hspec >= 1.1 && < 1.3 , bytestring >= 0.9 , case-insensitive >= 0.2 , text