{"action":"created","issue":{"url":"https://api.github.com/repos/pester/Pester/issues/561","repository_url":"https://api.github.com/repos/pester/Pester","labels_url":"https://api.github.com/repos/pester/Pester/issues/561/labels{/name}","comments_url":"https://api.github.com/repos/pester/Pester/issues/561/comments","events_url":"https://api.github.com/repos/pester/Pester/issues/561/events","html_url":"https://github.com/pester/Pester/issues/561","id":159900592,"number":561,"title":"Unable to create an object in a test and use it in another","user":{"login":"jeffchulg","id":1788348,"avatar_url":"https://avatars.githubusercontent.com/u/1788348?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffchulg","html_url":"https://github.com/jeffchulg","followers_url":"https://api.github.com/users/jeffchulg/followers","following_url":"https://api.github.com/users/jeffchulg/following{/other_user}","gists_url":"https://api.github.com/users/jeffchulg/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffchulg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffchulg/subscriptions","organizations_url":"https://api.github.com/users/jeffchulg/orgs","repos_url":"https://api.github.com/users/jeffchulg/repos","events_url":"https://api.github.com/users/jeffchulg/events{/privacy}","received_events_url":"https://api.github.com/users/jeffchulg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-13T08:49:13Z","updated_at":"2016-06-13T09:24:29Z","closed_at":null,"body":"Hi,\r\n\r\nI want to use an object in all my test suite. To do it, I want a test to create and initialize the object and other tests that will use it.\r\n\r\nHere is an example of what I want to do:\r\n\r\n```powershell\r\n$TemporaryLogger=$null\r\nDescribe \"Test home made PoSH Logger\" {\r\n    It \"Check that New-Logger function is available and create logger object\" {\r\n        $TemporaryLogger = New-Logger  ...\r\n    }\r\n    It \"Uses the logger object\" {\r\n        $TemporaryLogger.Info(\"Message\")\r\n    }\r\n}\r\n```\r\n\r\nI get an error as the TemporaryLogger variable is not set at test level but at the \"It\" block level.\r\n\r\n\r\nIs there a way to make it work ?\r\n"},"comment":{"url":"https://api.github.com/repos/pester/Pester/issues/comments/225530712","html_url":"https://github.com/pester/Pester/issues/561#issuecomment-225530712","issue_url":"https://api.github.com/repos/pester/Pester/issues/561","id":225530712,"user":{"login":"nohwnd","id":5735905,"avatar_url":"https://avatars.githubusercontent.com/u/5735905?v=3","gravatar_id":"","url":"https://api.github.com/users/nohwnd","html_url":"https://github.com/nohwnd","followers_url":"https://api.github.com/users/nohwnd/followers","following_url":"https://api.github.com/users/nohwnd/following{/other_user}","gists_url":"https://api.github.com/users/nohwnd/gists{/gist_id}","starred_url":"https://api.github.com/users/nohwnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nohwnd/subscriptions","organizations_url":"https://api.github.com/users/nohwnd/orgs","repos_url":"https://api.github.com/users/nohwnd/repos","events_url":"https://api.github.com/users/nohwnd/events{/privacy}","received_events_url":"https://api.github.com/users/nohwnd/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T09:24:29Z","updated_at":"2016-06-13T09:24:29Z","body":"You are welcome."}}
{"actor":{"display_login":"nohwnd"}}