Skip to content

checking text#20

Merged
shailiej merged 2 commits intomasterfrom
shl-tmp
Oct 27, 2017
Merged

checking text#20
shailiej merged 2 commits intomasterfrom
shl-tmp

Conversation

@shailiej
Copy link
Copy Markdown

first test

Comment thread tests/ginkgo/temp_test.go
var _ = Describe("Checking contents of the file", func() {

BeforeEach(EnterNewTempDir)
AfterEach(CleanupDir)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these ginkgo builtins?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, looks like they're in helpers.go

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Describe, BeforeEach & AfterEach are, CleanupDir is what Dex wrote

Comment thread tests/ginkgo/temp_test.go
WriteFile("blah.txt", `
Hey there!
Let's take a peek into my file!`)

Copy link
Copy Markdown
Contributor

@laverya laverya Oct 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally like searching the source file itself for some random nonce, with the random nonce only on the search line like this: Expect(contents).To(ContainSubstring("MBkQAZ93qN"))

But that's really arcane and probably an antipattern.

@shailiej shailiej merged commit e8c6ed0 into master Oct 27, 2017
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

Successfully merging this pull request may close these issues.

2 participants