Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adapt for hspec-1.3

  • Loading branch information...
commit a0aad56bf2ab3a74b21e46835b8cd79d3a419eda 1 parent 816d235
@sol authored
View
4 doctest.cabal
@@ -85,8 +85,8 @@ test-suite spec
, ghc-paths == 0.1.*
, transformers
, HUnit == 1.2.*
- , hspec-discover
- , hspec-shouldbe
+ , hspec >= 1.3
+ , QuickCheck
, stringbuilder
, silently
, filepath
View
2  test/ExtractSpec.hs
@@ -1,6 +1,6 @@
module ExtractSpec (main, spec) where
-import Test.Hspec.ShouldBe
+import Test.Hspec
import Test.HUnit
import Panic (GhcException (..))
View
2  test/InterpreterSpec.hs
@@ -1,6 +1,6 @@
module InterpreterSpec (main, spec) where
-import Test.Hspec.ShouldBe
+import Test.Hspec
import Data.List (isSuffixOf)
import System.Process (readProcess)
View
2  test/LocationSpec.hs
@@ -1,6 +1,6 @@
module LocationSpec (main, spec) where
-import Test.Hspec.ShouldBe
+import Test.Hspec
import Location
import SrcLoc
View
2  test/MainSpec.hs
@@ -1,6 +1,6 @@
module MainSpec (main, spec) where
-import Test.Hspec.ShouldBe hiding (Summary)
+import Test.Hspec
import Test.HUnit (assertEqual, Assertion)
import Control.Exception
View
5 test/ParseSpec.hs
@@ -2,8 +2,7 @@
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module ParseSpec (main, spec) where
-import Test.Hspec.ShouldBe
-import Test.HUnit
+import Test.Hspec
import Data.String.Builder (Builder, build)
import Control.Monad.Trans.Writer
@@ -25,7 +24,7 @@ prop_ = tell . return . Property . noLocation
module_ :: String -> Writer [DocTest] () -> Writer [Module DocTest] ()
module_ name = tell . return . Module name . execWriter
-shouldGive :: IO [Module DocTest] -> Writer [Module DocTest] () -> Assertion
+shouldGive :: IO [Module DocTest] -> Writer [Module DocTest] () -> Expectation
shouldGive action w = do
r <- map noLoc `fmap` action
r `shouldBe` execWriter w
View
2  test/PropertySpec.hs
@@ -2,7 +2,7 @@
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module PropertySpec (main, spec) where
-import Test.Hspec.ShouldBe
+import Test.Hspec
import Data.String.Builder
import Property
View
5 test/ReportSpec.hs
@@ -2,9 +2,8 @@
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module ReportSpec (main, spec) where
-import Test.Hspec.ShouldBe
+import Test.Hspec
import Data.String.Builder
-import Test.HUnit
import Data.Monoid
import System.IO
@@ -22,7 +21,7 @@ capture = fmap fst . hCapture [stderr] . (`execStateT` ReportState 0 True mempty
capture_ :: Report a -> IO String
capture_ = fmap fst . hCapture [stderr] . (`execStateT` ReportState 0 False mempty)
-shouldGive :: IO String -> Builder -> Assertion
+shouldGive :: IO String -> Builder -> Expectation
action `shouldGive` expected = action `shouldReturn` build expected
spec :: Spec
View
3  test/RunSpec.hs
@@ -1,6 +1,7 @@
module RunSpec (main, spec) where
-import Test.Hspec.ShouldBe hiding (Summary)
+import Test.Hspec
+import Test.QuickCheck
import System.Exit
import Control.Exception
View
2  test/UtilSpec.hs
@@ -1,6 +1,6 @@
module UtilSpec (main, spec) where
-import Test.Hspec.ShouldBe
+import Test.Hspec
import Util
Please sign in to comment.
Something went wrong with that request. Please try again.