yesod-test uses hspec 1.2 as well

This commit is contained in:
Michael Snoyman 2012-06-30 22:17:49 +03:00
parent 9414ec04a5
commit a0c26206e3
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,5 @@
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
import Test.HUnit hiding (Test) import Test.HUnit hiding (Test)
import Test.Hspec.Monadic import Test.Hspec.Monadic
import Test.Hspec.HUnit () import Test.Hspec.HUnit ()
@ -15,7 +16,13 @@ findBySelector_ x = either error id . findBySelector x
parseHtml_ = either error id . parseHtml parseHtml_ = either error id . parseHtml
main :: IO () main :: IO ()
main = hspecX $ do main =
#if MIN_VERSION_hspec(1,2,0)
hspec
#else
hspecX
#endif
$ do
describe "CSS selector parsing" $ do describe "CSS selector parsing" $ do
it "elements" $ parseQuery_ "strong" @?= [[DeepChildren [ByTagName "strong"]]] it "elements" $ parseQuery_ "strong" @?= [[DeepChildren [ByTagName "strong"]]]
it "child elements" $ parseQuery_ "strong > i" @?= [[DeepChildren [ByTagName "strong"], DirectChildren [ByTagName "i"]]] it "child elements" $ parseQuery_ "strong > i" @?= [[DeepChildren [ByTagName "strong"], DirectChildren [ByTagName "i"]]]

View File

@ -1,5 +1,5 @@
name: yesod-test name: yesod-test
version: 0.2.0.6 version: 0.2.1
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Nubis <nubis@woobiz.com.ar> author: Nubis <nubis@woobiz.com.ar>
@ -29,7 +29,7 @@ library
, network >= 2.2 && < 2.4 , network >= 2.2 && < 2.4
, http-types >= 0.6 && < 0.7 , http-types >= 0.6 && < 0.7
, HUnit >= 1.2 && < 1.3 , HUnit >= 1.2 && < 1.3
, hspec >= 1.1 && < 1.2 , hspec >= 1.1 && < 1.3
, bytestring >= 0.9 , bytestring >= 0.9
, case-insensitive >= 0.2 , case-insensitive >= 0.2
, text , text