Permalink
Browse files

Use Hspec's `shouldBe` instead of HUnit's @?=

  • Loading branch information...
1 parent 01d819e commit a5d846837275608f5e3d51bb50b1ff538e7b68e0 @sol sol committed Jul 14, 2012
Showing with 4 additions and 6 deletions.
  1. +0 −1 process-conduit.cabal
  2. +4 −5 test.hs
View
@@ -46,6 +46,5 @@ test-suite process-conduit-test
build-depends: base == 4.*
, bytestring
, hspec >= 1.3
- , HUnit >= 1.2
, conduit
, process-conduit
View
@@ -7,30 +7,29 @@ import qualified Data.ByteString.Lazy.Char8 as L
import Data.Conduit
import qualified Data.Conduit.Binary as CB
import Test.Hspec
-import Test.HUnit
main :: IO ()
main = hspec $ do
describe "process conduit" $ do
it "get process's output" $ do
r <- runResourceT $ sourceCmd "echo abc def" $$ CB.take (10^9)
- L.words r @?= ["abc", "def"]
+ L.words r `shouldBe` ["abc", "def"]
it "act as conduit" $ do
r <- runResourceT $
sourceProcess (proc "echo" ["zxc\nasd\nqwe"])
$$ conduitCmd "sort"
=$ CB.take (10^9)
- L.words r @?= ["asd", "qwe", "zxc"]
+ L.words r `shouldBe` ["asd", "qwe", "zxc"]
describe "quasiquoter" $ do
it "get process's output" $ do
r <- [cmd|echo abc def|]
- L.words r @?= ["abc", "def"]
+ L.words r `shouldBe` ["abc", "def"]
it "act as conduit" $ do
r <- runResourceT $
sourceProcess (proc "echo" ["zxc\nasd\nqwe"])
$$ [ccmd|sort|]
=$ CB.take (10^9)
- L.words r @?= ["asd", "qwe", "zxc"]
+ L.words r `shouldBe` ["asd", "qwe", "zxc"]

0 comments on commit a5d8468

Please sign in to comment.