{"action":"created","issue":{"url":"https://api.github.com/repos/philsquared/Catch/issues/537","labels_url":"https://api.github.com/repos/philsquared/Catch/issues/537/labels{/name}","comments_url":"https://api.github.com/repos/philsquared/Catch/issues/537/comments","events_url":"https://api.github.com/repos/philsquared/Catch/issues/537/events","html_url":"https://github.com/philsquared/Catch/issues/537","id":116120702,"number":537,"title":"Init / cleanup in tests?","user":{"login":"rcdailey","id":1768054,"avatar_url":"https://avatars.githubusercontent.com/u/1768054?v=3","gravatar_id":"","url":"https://api.github.com/users/rcdailey","html_url":"https://github.com/rcdailey","followers_url":"https://api.github.com/users/rcdailey/followers","following_url":"https://api.github.com/users/rcdailey/following{/other_user}","gists_url":"https://api.github.com/users/rcdailey/gists{/gist_id}","starred_url":"https://api.github.com/users/rcdailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcdailey/subscriptions","organizations_url":"https://api.github.com/users/rcdailey/orgs","repos_url":"https://api.github.com/users/rcdailey/repos","events_url":"https://api.github.com/users/rcdailey/events{/privacy}","received_events_url":"https://api.github.com/users/rcdailey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-11-10T14:46:47Z","updated_at":"2015-11-27T09:11:18Z","closed_at":null,"body":"Is there a mechanism to perform initialization before any test cases run, and cleanup after they are done?\r\n\r\nHow is this being accomplished today?"},"comment":{"url":"https://api.github.com/repos/philsquared/Catch/issues/comments/160081866","html_url":"https://github.com/philsquared/Catch/issues/537#issuecomment-160081866","issue_url":"https://api.github.com/repos/philsquared/Catch/issues/537","id":160081866,"user":{"login":"philsquared","id":92878,"avatar_url":"https://avatars.githubusercontent.com/u/92878?v=3","gravatar_id":"","url":"https://api.github.com/users/philsquared","html_url":"https://github.com/philsquared","followers_url":"https://api.github.com/users/philsquared/followers","following_url":"https://api.github.com/users/philsquared/following{/other_user}","gists_url":"https://api.github.com/users/philsquared/gists{/gist_id}","starred_url":"https://api.github.com/users/philsquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philsquared/subscriptions","organizations_url":"https://api.github.com/users/philsquared/orgs","repos_url":"https://api.github.com/users/philsquared/repos","events_url":"https://api.github.com/users/philsquared/events{/privacy}","received_events_url":"https://api.github.com/users/philsquared/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T09:11:18Z","updated_at":"2015-11-27T09:11:18Z","body":"+1 for \"RAII is the only guaranteed solution\".\r\nThe fact is, in the five or so years I've been developing Catch, and using it in several projects - including a >1m LOC financial system - I'm not sure ever had to even do that. As a rule any resources that should be \"clean-up\" are *already* in RAII objects.\r\nEven if you look beyond unit tests (I use Catch for integration tests and others) things like file handles, database connections etc are all wrapped in objects that clean themselves up.\r\n\r\nIn any case we're getting off the original topic. @rcdailey are you happy that your original question has been answered (by @jfemia, augmented by the link I posted)? Can I close the issue?"}}