diff options
Diffstat (limited to 'commands/execenv/env_testing.go')
-rw-r--r-- | commands/execenv/env_testing.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/commands/execenv/env_testing.go b/commands/execenv/env_testing.go index 34eafc9c..6eb9c69d 100644 --- a/commands/execenv/env_testing.go +++ b/commands/execenv/env_testing.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "io" "testing" "github.com/stretchr/testify/require" @@ -12,6 +13,8 @@ import ( "github.com/MichaelMure/git-bug/repository" ) +var _ Out = &TestOut{} + type TestOut struct { *bytes.Buffer } @@ -37,6 +40,10 @@ func (te *TestOut) PrintJSON(v interface{}) error { return nil } +func (te *TestOut) Raw() io.Writer { + return te.Buffer +} + func NewTestEnv(t *testing.T) *Env { t.Helper() |