-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Represent a template #3
Represent a template #3
Conversation
Create a template and the mechanism to ask questions form template prompts Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, and glad it was merged! Just a few small nits
"github.com/sclevine/spec/report" | ||
) | ||
|
||
func TestIternal(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestInternal
?
func testReadPrompt(t *testing.T, when spec.G, it spec.S) { | ||
when("Reading a prompt file", func() { | ||
it("reads a correct prompt file", func() { | ||
tmpDir, _ := ioutil.TempDir("", "test") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You can use t.TempDir()
to simplify this, and not require the explicit os.RemoveAll
f, _ := os.Create(promptFile) | ||
f.Write([]byte(correctPromptFile)) | ||
f.Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You can use os.WriteFile()
to simplify this, if you're anyways closing the file descriptor here
Create a template and the mechanism to ask questions form template prompts
Signed-off-by: Aidan Delaney adelaney21@bloomberg.net