diff --git a/mockery.cabal b/mockery.cabal
--- a/mockery.cabal
+++ b/mockery.cabal
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.1.2.
+-- This file has been generated from package.yaml by hpack version 0.3.0.
 --
 -- see: https://github.com/sol/hpack
 
 name:           mockery
-version:        0.2.0
+version:        0.2.1
 synopsis:       Support functions for automated testing
 description:    Support functions for automated testing
 category:       Testing
@@ -27,6 +27,7 @@
       Test.Mockery.Logging
   build-depends:
       base == 4.*
+    , bytestring
     , temporary
     , directory
     , logging-facade
@@ -42,6 +43,7 @@
       Test.Mockery.LoggingSpec
   build-depends:
       base == 4.*
+    , bytestring
     , temporary
     , directory
     , logging-facade
diff --git a/src/Test/Mockery/Directory.hs b/src/Test/Mockery/Directory.hs
--- a/src/Test/Mockery/Directory.hs
+++ b/src/Test/Mockery/Directory.hs
@@ -2,12 +2,16 @@
   inTempDirectory
 , inTempDirectoryNamed
 , withFile
+, touch
 ) where
 
 import           Control.Exception
+import           Control.Monad
 import           System.Directory
+import           System.IO.Error
 import           System.IO hiding (withFile)
 import           System.IO.Temp (withSystemTempDirectory, withSystemTempFile)
+import qualified Data.ByteString as B
 
 -- |
 -- Run given action with the current working directory set to a temporary
@@ -41,3 +45,11 @@
   hPutStr h input
   hClose h
   action file
+
+-- |
+-- Update the modification time of the specified file.  Create an empty file if
+-- the file does not exist.
+touch :: FilePath -> IO ()
+touch file = do
+  c <- catchJust (guard . isDoesNotExistError) (B.readFile file) (const $ return B.empty)
+  B.writeFile file c
diff --git a/src/Test/Mockery/Logging.hs b/src/Test/Mockery/Logging.hs
--- a/src/Test/Mockery/Logging.hs
+++ b/src/Test/Mockery/Logging.hs
@@ -2,6 +2,7 @@
 module Test.Mockery.Logging (
   captureLogMessages
 , captureLogMessages_
+, LogLevel(..)
 ) where
 
 import           Control.Applicative
diff --git a/test/Test/Mockery/DirectorySpec.hs b/test/Test/Mockery/DirectorySpec.hs
--- a/test/Test/Mockery/DirectorySpec.hs
+++ b/test/Test/Mockery/DirectorySpec.hs
@@ -1,13 +1,42 @@
-
 module Test.Mockery.DirectorySpec where
 
 import           Test.Hspec
+import           System.Directory
+import           System.Environment
+import           Control.Concurrent
+import           Data.Foldable
 
 import           Test.Mockery.Directory
 
+whenTravis :: IO () -> IO ()
+whenTravis action = do
+  env <- getEnvironment
+  forM_ (lookup "TRAVIS" env) (const action)
+
 spec :: Spec
 spec = do
   describe "withFile" $ do
     it "creates a temporary file with the given contents" $ do
       withFile "foo" $ \file ->
         readFile file `shouldReturn` "foo"
+
+  describe "touch" $ do
+    around_ inTempDirectory $ do
+      let name = "foo"
+      it "creates an empty file" $ do
+        touch name
+        readFile name `shouldReturn` ""
+
+      context "when file already exists" $ do
+        before_ (writeFile name "bar") $ do
+          it "updates modification time" $ do
+            t0 <- getModificationTime name
+            threadDelay 10000
+            whenTravis (threadDelay 1000000)
+            touch name
+            t1 <- getModificationTime name
+            t0 `shouldSatisfy` (< t1)
+
+          it "does not modify file content" $ do
+            touch name
+            readFile name `shouldReturn` "bar"
