Skip to content
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

sanity check of before/after should run as a set #29

Open
stagrlee opened this issue Jan 23, 2013 · 0 comments
Open

sanity check of before/after should run as a set #29

stagrlee opened this issue Jan 23, 2013 · 0 comments

Comments

@stagrlee
Copy link

Before should setup a test case condition.
After should clean up that condition to eliminate side effects put in by "before". Therefore, it is typical to pass state from before to after which cleans up the mess. For instance, creating a scratch directory in before with "mktemp -d" should be deleted by after... This doesn't work when roundup tests the sanity of before/after and you end up with side effects.

before() {
    OUT=$(mktemp -d "/tmp/roundup.test.XXXXX")
}

after() {
    rm -rf ${OUT}
}
LukeShu added a commit to LukeShu/roundup that referenced this issue Apr 11, 2017
See the comments for a fuller explanation of the changes.

This should obsolete bmizerany#23 (though
the test cases from it should still be merged).

This should fix bmizerany#29 .

This should fix bmizerany#44 .
LukeShu added a commit to LukeShu/roundup that referenced this issue Apr 11, 2017
See the comments for a fuller explanation of the changes.

This should obsolete bmizerany#23 (though
the test cases from it should still be merged).

This should fix bmizerany#29 .

This should fix bmizerany#44 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant