destDir string ) BeforeEach(func() { var err error githubClient = &fakes.FakeGitHub{} githubServer = ghttp.NewServer() command = resource.NewInCommand(githubClient, ioutil.Discard) tmpDir, err = ioutil.TempDir("", "github-release") Ω(err).ShouldNot(HaveOccurred()) destDir = filepath.Join(tmpDir, "destination") githubClient.DownloadReleaseAssetReturns(ioutil.NopCloser(bytes.NewBufferString("some-content")), nil) inRequest = resource.InRequest{} }) AfterEach(func() { Ω(os.RemoveAll(tmpDir)).Should(Succeed()) }) buildRelease := func(id int, tag string, draft bool) *github.RepositoryRelease { return &github.RepositoryRelease{ ID: github.Int(id), TagName: github.String(tag), HTMLURL: github.String("http://google.com"), Name: github.String("release-name"), Body: github.String("*markdown*"),