-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#206] Test on toml-v0.4.0 example #208
Conversation
One of the checks failed because of the issue described in #198 (same-level tables with common subkeys) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding a lot of tests! Now we have even more robust testing system.
test/Test/Toml/Parsing/Examples.hs
Outdated
|
||
files :: [FilePath] | ||
files = | ||
[ "fruit.toml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to use listDirectory
function inside tests to avoid hardcoding of test cases:
You can use runIO
function from hspec
to run IO
actions inside Spec
monad:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into runIO
when I was figuring out how to read files in a Spec
but then I realized it
can handle it just fine, I think I'll leave it like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, I guess it's necessary if I want to use listDirectory
. On it.
Co-Authored-By: Dmitrii Kovanikov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Fix for #206. I apologize for letting that slip through me to begin with.
I don't have much experience with
hspec
, please let me know if I did something strange.