Skip to content

Commit

Permalink
fix(git): Added headers for each option (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
durandj committed Mar 14, 2019
1 parent 4a9f59b commit 7dec028
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/gitignore/git_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func (adapter *GitAdapter) Generate(options []string) (string, error) {
return "", errors.Wrap(err, message)
}

builder.WriteString(fmt.Sprintf("### %s ###\n", option))
builder.Write(contents)
builder.WriteString("\n")
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/gitignore/git_adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ var _ = Describe("GitAdapter", func() {

Expect(err).To(BeNil())

Expect(contents).To(ContainSubstring("### C ###"))
Expect(contents).To(ContainSubstring("*.o"))
Expect(contents).To(ContainSubstring("### Python ###"))
Expect(contents).To(ContainSubstring("__pycache__/"))
})

Expand Down

0 comments on commit 7dec028

Please sign in to comment.