hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit f25ce7fefa797f01cc190c278832b23eb7e923e7
parent d770fa59a5c8096a74d028b5cb698c01a692ed50
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Sun, 21 Jun 2015 15:01:02 +0200

Revert "Move matchRender to test helpers file"

This reverts commit 32d91d616e99cd05b59644e292b29be415d5054f.

Diffstat:
Mhugolib/helpers_for_test.go | 13-------------
Mhugolib/site_test.go | 12++++++++++++
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/hugolib/helpers_for_test.go b/hugolib/helpers_for_test.go
@@ -1,7 +1,6 @@
 package hugolib
 
 import (
-	"bytes"
 	"testing"
 
 	"github.com/spf13/afero"
@@ -79,15 +78,3 @@ func pageMust(p *Page, err error) *Page {
 	}
 	return p
 }
-
-func matchRender(t *testing.T, s *Site, p *Page, tmplName string, expected string) {
-	content := new(bytes.Buffer)
-	err := s.renderThing(p, tmplName, NopCloser(content))
-	if err != nil {
-		t.Fatalf("Unable to render template.")
-	}
-
-	if string(content.Bytes()) != expected {
-		t.Fatalf("Content did not match expected: %s. got: %s", expected, content)
-	}
-}
diff --git a/hugolib/site_test.go b/hugolib/site_test.go
@@ -79,6 +79,18 @@ func NopCloser(w io.Writer) io.WriteCloser {
 	return nopCloser{w}
 }
 
+func matchRender(t *testing.T, s *Site, p *Page, tmplName string, expected string) {
+	content := new(bytes.Buffer)
+	err := s.renderThing(p, tmplName, NopCloser(content))
+	if err != nil {
+		t.Fatalf("Unable to render template.")
+	}
+
+	if string(content.Bytes()) != expected {
+		t.Fatalf("Content did not match expected: %s. got: %s", expected, content)
+	}
+}
+
 func TestRenderThing(t *testing.T) {
 	tests := []struct {
 		content  string