22
33module FeatureSpec ( spec ) where
44
5- import Cli as Cli
5+ import qualified Hi. Cli as Cli
66import Hi.Directory (inDirectory )
77import Hi.Version (version )
88
@@ -39,10 +39,10 @@ spec = do
3939
4040 describe " with --initialize-git-repository" $ do
4141 let cmd = runWithCommandLineOptions [ " --initialize-git-repository"
42- , " -p"
43- , packageName
44- , " -m"
45- , moduleName ]
42+ , " -p"
43+ , packageName
44+ , " -m"
45+ , moduleName ]
4646 around cmd $ do
4747 it " should initialize it as git repository and make first commit" $ do
4848 inDirectory " ./testapp" $ do
@@ -53,7 +53,7 @@ spec = do
5353 let handle ExitSuccess = return ()
5454 handle e = throwIO e
5555
56- (res,_) <- capture $ Cli. runWithArgs [" -v" ] `catch` handle
56+ (res,_) <- capture $ Cli. run [" -v" ] `catch` handle
5757 res `shouldBe` version ++ " \n "
5858
5959packageName , moduleName , author , email :: String
@@ -146,10 +146,10 @@ runWithCommandLineOptions opts action = do
146146 pwd <- getCurrentDirectory
147147
148148 inTestDirectory $ do
149- Cli. runWithArgs $ opts ++ [ " -a" , quote author
150- , " -e" , quote email
151- , " -r file://" ++ pwd ++ " /template"
152- ]
149+ Cli. run $ opts ++ [ " -a" , quote author
150+ , " -e" , quote email
151+ , " -r file://" ++ pwd ++ " /template"
152+ ]
153153 action
154154
155155runWithLocalGitConfig :: [String ] -> IO () -> IO ()
@@ -160,10 +160,10 @@ runWithLocalGitConfig opts action = do
160160 _ <- system $ " git init"
161161 _ <- system $ " git config user.name" ++ " " ++ quote author
162162 _ <- system $ " git config user.email" ++ " " ++ quote email
163- Cli. runWithArgs $ opts ++ [ " -a" , quote author
164- , " -e" , quote email
165- , " -r file://" ++ pwd ++ " /template"
166- ]
163+ Cli. run $ opts ++ [ " -a" , quote author
164+ , " -e" , quote email
165+ , " -r file://" ++ pwd ++ " /template"
166+ ]
167167 action
168168
169169inTestDirectory :: IO () -> IO ()
0 commit comments