-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Support functions for automated testing
--   
--   Support functions for automated testing
@package mockery
@version 0.3.2

module Test.Mockery.Logging

-- | Capture all log messages produced by an IO action. Logs are kept in
--   memory.
captureLogMessages :: IO a -> IO ([(LogLevel, String)], a)

-- | Like <tt>captureLogsMessages</tt>, but ignores the result.
captureLogMessages_ :: IO a -> IO [(LogLevel, String)]
data LogLevel :: *
TRACE :: LogLevel
DEBUG :: LogLevel
INFO :: LogLevel
WARN :: LogLevel
ERROR :: LogLevel

module Test.Mockery.Directory

-- | Run given action with the current working directory set to a temporary
--   directory.
--   
--   The directory is created before the action is run. After the action
--   has completed the directory is removed and the current working
--   directory is restored to its original value.
inTempDirectory :: IO a -> IO a

-- | Similar to <a>inTempDirectory</a>, but the temporary directory will
--   have the specified name.
inTempDirectoryNamed :: FilePath -> IO a -> IO a

-- | Create a temporary file with the given contents and execute the given
--   action.
--   
--   The file is removed after the action has completed.
withFile :: String -> (FilePath -> IO a) -> IO a

-- | Update the modification time of the specified file. Create an empty
--   file (including any missing directories in the file path) if the file
--   does not exist.
touch :: FilePath -> IO ()
