github.com/daniel-garcia/glide@v0.0.0-20160218012856-2eab91fab790/action/about_test.go (about)

     1  package action
     2  
     3  import (
     4  	"bytes"
     5  	"testing"
     6  
     7  	"github.com/Masterminds/glide/msg"
     8  )
     9  
    10  func TestAbout(t *testing.T) {
    11  	var buf bytes.Buffer
    12  	old := msg.Default.Stdout
    13  	msg.Default.Stdout = &buf
    14  	About()
    15  
    16  	if buf.Len() < len(aboutMessage) {
    17  		t.Errorf("expected this to match aboutMessage: %q", buf.String())
    18  	}
    19  
    20  	msg.Default.Stdout = old
    21  }