| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Syd.Def.Scenario
Synopsis
- scenarioDir :: FilePath -> (FilePath -> TestDefM outers inner ()) -> TestDefM outers inner ()
- scenarioDirRecur :: FilePath -> (FilePath -> TestDefM outers inner ()) -> TestDefM outers inner ()
Documentation
scenarioDir :: FilePath -> (FilePath -> TestDefM outers inner ()) -> TestDefM outers inner () Source #
Define a test for each file in the given directory.
Example:
scenarioDir "test_resources/even" $ \fp ->
it "contains an even number" $ do
s <- readFile fp
n <- readIO s
(n :: Int) `shouldSatisfy` evenscenarioDirRecur :: FilePath -> (FilePath -> TestDefM outers inner ()) -> TestDefM outers inner () Source #
Define a test for each file in the given directory, recursively.
Example:
scenarioDirRecur "test_resources/odd" $ \fp ->
it "contains an odd number" $ do
s <- readFile fp
n <- readIO s
(n :: Int) `shouldSatisfy` odd