gregwebs/Shelly.hs

Unit Testing Scripts

Closed this issue · 1 comments

Hi,

I am currently migrating some shell scripts into Haskell using Shelly. One thing that I have noticed is the lack of information / documentation about how to unit test commands using Shelly. Is there any way to mock the Sh monad with a different mock implementation? Or any recommended ways to write unit tests?

Thank you in advanced!

Currently there's no help for mocking. I generally create a subdirectory to operate in and then remove it when the test is done. It's not a mock, but that's the point.