diff --git a/Yesod/Static.hs b/Yesod/Static.hs
--- a/Yesod/Static.hs
+++ b/Yesod/Static.hs
@@ -33,6 +33,9 @@
     , publicFiles
       -- * Hashing
     , base64md5
+#ifdef TEST
+    , getFileListPieces 
+#endif
     ) where
 
 import Prelude hiding (FilePath)
diff --git a/test/YesodStaticTest.hs b/test/YesodStaticTest.hs
new file mode 100644
--- /dev/null
+++ b/test/YesodStaticTest.hs
@@ -0,0 +1,16 @@
+module YesodStaticTest (specs) where
+
+import Test.Hspec
+import Test.HUnit ( (@?=) )
+import Test.Hspec.HUnit ( )
+
+import Yesod.Static (getFileListPieces)
+
+specs :: [Specs]
+specs = [
+    describe "get file list" [
+      it "pieces" $ do
+        x <- getFileListPieces "test/fs"
+        x @?= [["foo"], ["bar", "baz"]]
+    ]
+  ]
diff --git a/tests.hs b/tests.hs
new file mode 100644
--- /dev/null
+++ b/tests.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+import Test.Hspec
+import YesodStaticTest (specs)
+
+main :: IO ()
+main = hspecX $ descriptions specs
diff --git a/tests/runtests.hs b/tests/runtests.hs
deleted file mode 100644
--- a/tests/runtests.hs
+++ /dev/null
@@ -1,17 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-import Yesod.Static ()
-
-import Test.Hspec
-import Test.Hspec.HUnit ()
--- import Test.Hspec.QuickCheck (prop)
-
-main :: IO ()
-main = return () -- hspecX $ return []
-{- FIXME specs
-
-specs :: IO [Spec]
-specs = runSpecM $ do
-  context "get file list" $ do
-    ti "pieces" $ do
-      x <- getFileListPieces "tests/data"
-      x @?= [["foo"], ["bar", "baz"]]-}
diff --git a/yesod-static.cabal b/yesod-static.cabal
--- a/yesod-static.cabal
+++ b/yesod-static.cabal
@@ -1,5 +1,5 @@
 name:            yesod-static
-version:         0.3.1.2
+version:         0.3.2
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -12,45 +12,48 @@
 homepage:        http://www.yesodweb.com/
 description:     Static file serving subsite for Yesod Web Framework.
 extra-source-files:
-  tests/runtests.hs
+  test/YesodStaticTest.hs
+  tests.hs
 
 flag test
-  description: Build the executable to run unit tests
+  description: Build for use with running tests
   default: False
 
 library
-    build-depends:   base                      >= 4        && < 5
-                   , containers
-                   , old-time                  >= 1.0
-                   , yesod-core                >= 0.9      && < 0.10
-                   , base64-bytestring         >= 0.1.0.1  && < 0.2
-                   , pureMD5                   >= 2.1.0.3  && < 2.2
-                   , cereal                    >= 0.3      && < 0.4
-                   , bytestring                >= 0.9      && < 0.10
+    if flag(test)
+      cpp-options:   -DTEST
+
+    build-depends:   base                  >= 4        && < 5
+                   , containers            >= 0.2      && < 0.5
+                   , old-time              >= 1.0
+                   , yesod-core            >= 0.9      && < 0.10
+                   , base64-bytestring     >= 0.1.0.1  && < 0.2
+                   , pureMD5               >= 2.1.0.3  && < 2.2
+                   , cereal                >= 0.3      && < 0.4
+                   , bytestring            >= 0.9.1.4  && < 0.10
                    , template-haskell
-                   , directory                 >= 1.0      && < 1.2
-                   , transformers              >= 0.2      && < 0.3
-                   , wai-app-static            >= 0.3.2.1  && < 0.4
-                   , wai                       >= 0.4      && < 0.5
-                   , text                      >= 0.5      && < 1.0
-                   , file-embed                >= 0.0.4.1  && < 0.5
-                   , http-types                >= 0.6.5    && < 0.7
-                   , unix-compat               >= 0.2      && < 0.3
-                   , enumerator                >= 0.4.14   && < 0.5
+                   , directory             >= 1.0      && < 1.2
+                   , transformers          >= 0.2.2    && < 0.3
+                   , wai-app-static        >= 0.3.2.1  && < 0.4
+                   , wai                   >= 0.4      && < 0.5
+                   , text                  >= 0.9      && < 0.12
+                   , file-embed            >= 0.0.4.1  && < 0.5
+                   , http-types            >= 0.6.5    && < 0.7
+                   , unix-compat           >= 0.2
+                   , enumerator            >= 0.4.8    && < 0.5
     exposed-modules: Yesod.Static
     ghc-options:     -Wall
 
-test-suite runtests
-    hs-source-dirs: tests
-    main-is: runtests.hs
+test-suite tests
+    hs-source-dirs: test
+    main-is: ../tests.hs
     type: exitcode-stdio-1.0
     cpp-options:   -DTEST
     build-depends:   yesod-static
                    , base >= 4 && < 5
-                   , hspec >= 0.8   && < 0.9
+                   , hspec >= 0.8   && < 0.10
                    , HUnit
     ghc-options:     -Wall
-    main-is:         runtests.hs
 
 source-repository head
   type:     git
