directory-layout-0.6.0.0: test/System/Directory/LayoutSpec.hs
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module System.Directory.LayoutSpec
( spec
) where
import Control.Lens
import Test.Hspec
import System.Directory.Layout hiding (spec)
import qualified System.Directory.Layout.Interpreter as L
spec :: Spec
spec = do
describe "directory-layout project structure" $ do
rel L.spec project
project :: Layout ()
project = do
dir "src" $ do
dirs ["System", "Directory"] $ do
dir "Layout" $ do
file "Internal.hs"
file "Interpreter.hs"
file "Layout.hs"
dir "test" $ do
dirs ["System", "Directory"] $ do
dir "Layout" $ do
file "InternalSpec.hs"
file "InterpreterSpec.hs"
file "LayoutSpec.hs"
file "Spec.hs"
& contents ?~ [dedent|
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
|]
file "SpecHelper.hs"
file "LICENSE"
file "Guardfile"
file "Setup.hs"
file "directory-layout.cabal"
rel :: (FilePath -> Layout a -> b) -> Layout a -> b
rel f = f "."