-
Notifications
You must be signed in to change notification settings - Fork 4
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
Issue #56 - Use unique database filenames and cleanup the database files after testing. #61
Conversation
@arcturus r? |
Apparently "doc test" will still fail for the same reason. |
This skip "running" the documentation examples. |
Not only this makes tests more complicated but it introduces a way for examples to be out of date, reduce coverage (the examples themselves). The solution is to mock db or use one process. I would not accept a patch introducing complexity until the real problem is fixed. |
What is complicated is that:
What my patch do is remove 1. and address 2. As for the real problem, issue #53 should solve the side effect better. For the documentation examples:
|
I did not know about |
@@ -344,6 +344,7 @@ describe! setup_tests { | |||
assert!(false); | |||
} | |||
}; | |||
remove_test_db(); |
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.
Should we move this to after_each
?
And all the remove_test_db calls below.
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.
When I do that I seem to get a test failure. And I haven't figured out how to view the generated code by the macro - to see what was happening - so I chose the easy way.
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.
Would I be really picky if i ask to spend some times knowing why it's happening? Cause it looks a bit weird to me right now with all those calls.
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 think we are hitting reem/stainless#47.
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.
Adding a ; at the end of each "it" block make it work. Updating PR.
…les after testing.
r? @arcturus - I addressed that last comment working around a bug in stainless. |
Great stuff! |
Issue #56 - Use unique database filenames and cleanup the database files after testing.
No description provided.