Created
April 1, 2018 14:43
-
-
Save napicella/a5b8db6d0fbd11acf9e74937cd89055f to your computer and use it in GitHub Desktop.
Golang-patterns options
This file contains 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
Context("Greeting with no Name option", func() { | |
It("returns default greeting", func() { | |
greeting := NewGreeting() | |
Expect(greeting.get()).To(Equal("Hello Stranger")) | |
}) | |
}) | |
Context("Greeting with Name option", func() { | |
It("returns custom greeting", func() { | |
greeting := NewGreeting(Name("Mickey")) | |
Expect(greeting.get()).To(Equal("Hello Mickey")) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment