Last active
June 25, 2019 15:43
-
-
Save williammartin/d99f96b226b29240a14c9cab4938af37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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