Skip to content

Instantly share code, notes, and snippets.

@williammartin
Last active June 25, 2019 15:43
Show Gist options
  • Select an option

  • Save williammartin/d99f96b226b29240a14c9cab4938af37 to your computer and use it in GitHub Desktop.

Select an option

Save williammartin/d99f96b226b29240a14c9cab4938af37 to your computer and use it in GitHub Desktop.
var _ = Describe("ginkgotcha", func() {
var number int
BeforeEach(func() {
number = 10
})
It("is equal to 10", func() {
Expect(number).To(Equal(10))
})
When("the number is set to 42", func() {
BeforeEach(func() {
number = 42
})
It("is equal to 42", func() {
Expect(number).To(Equal(42))
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment