From 857fb3761d06f3f0813eb1bf43501335c9fb44c2 Mon Sep 17 00:00:00 2001 From: Chase Hutchins Date: Fri, 29 Jan 2016 04:34:40 -0800 Subject: [PATCH] reusing variables to retry travis due to failure of coveralls from a travis bug --- echo_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/echo_test.go b/echo_test.go index 84d52309..8a95cc06 100644 --- a/echo_test.go +++ b/echo_test.go @@ -44,16 +44,21 @@ func TestEcho(t *testing.T) { func TestLogger(t *testing.T) { prefix := "extremely-long-prefix-string-that-wont-exist" + logmsg := "test-log-message" + e := New() var b bytes.Buffer - out := bufio.NewWriter(&b) + writer := bufio.NewWriter(&b) e.logger.SetPrefix(prefix) - e.logger.SetOutput(out) - e.logger.Print("test") + e.logger.SetOutput(writer) + e.logger.Print(logmsg) - assert.Contains(t, "extremely-long-prefix-string", b.String()) + output := b.String() + + assert.Contains(t, prefix, output) + assert.Contains(t, logmsg, output) } func TestEchoIndex(t *testing.T) {