mockery-0.3.3: Support functions for automated testing

Safe HaskellSafe
LanguageHaskell2010

Test.Mockery.Environment

Synopsis

Documentation

withEnvironment :: [(String, String)] -> IO a -> IO a Source

Run the given action with the specified environment.

Before executing the action, withEnvironment backs up the current environment, clears out the environment, and then applies the supplied environment. After the action has completed the original environment is restored. Note: The environment is global for a process, so tests that depend on the environment can no longer be run in parallel.