I am writing specialised rules and oracles for Shake and I would like to write tests for those functions. How can I do that in Shake? I did not find any simple to use actionToIO
function that could do the job.
For example, I would like to test the behaviour of the following :
checkGitWorkDirIsClean = do
Stdout out <- cmd "git" [ "status", "-s", "-uno" ]
pure $ null $ filter (/= "") (lines out)
so I could create prepare directories containing minimalistic git data and test the function against those directories.