packages feed

hspec-discover 0.0.1 → 0.0.2

raw patch · 3 files changed

+24/−8 lines, 3 files

Files

hspec-discover.cabal view
@@ -1,5 +1,5 @@ name:             hspec-discover-version:          0.0.1+version:          0.0.2 license:          MIT license-file:     LICENSE copyright:        (c) 2012 Simon Hengel@@ -16,6 +16,15 @@   location: https://github.com/sol/hspec-discover  library+  ghc-options:+      -Wall+  hs-source-dirs:+      src+  exposed-modules:+      Test.Hspec.Discover+  build-depends:+      base >= 4 && <= 5+    , hspec == 1.1.*  executable hspec-discover   ghc-options:@@ -30,7 +39,6 @@       base >= 4 && <= 5     , filepath     , directory-    , hspec == 1.1.*  test-suite spec   type:
src/Run.hs view
@@ -24,7 +24,7 @@       ["--nested"] -> return True       _            -> exit     specs <- findSpecs src-    writeFile dst (mkSpecModule nested specs)+    writeFile dst (mkSpecModule src nested specs)   _ -> exit   where     exit = do@@ -32,13 +32,14 @@       hPutStrLn stderr ("usage: " ++ name ++ " SRC CUR DST [--nested]")       exitFailure -mkSpecModule :: Bool -> [SpecNode] -> String-mkSpecModule nested nodes =-  ( showString "module Main where\n"-  . showString "import Test.Hspec.Monadic\n"+mkSpecModule :: FilePath -> Bool -> [SpecNode] -> String+mkSpecModule src nested nodes =+  ( "{-# LINE 1 " . shows src . " #-}"+  . showString "module Main where\n"+  . showString "import Test.Hspec.Discover\n"   . importList nodes   . showString "main :: IO ()\n"-  . showString "main = hspecX $ "+  . showString "main = hspec $ "   . format nodes   ) "\n"   where
+ src/Test/Hspec/Discover.hs view
@@ -0,0 +1,7 @@+{-# OPTIONS_HADDOCK hide #-}+module Test.Hspec.Discover (hspec, describe) where++import Test.Hspec.Monadic (Specs, hspecX, describe)++hspec :: Specs -> IO ()+hspec = hspecX