[from now] 2013/11/24 23:57:40

diff --git a/src/main/groovy/gaiden/BindingBuilder.groovy b/src/main/groovy/gaiden/BindingBuilder.groovy
index 26f2db9..5f66067 100644
--- a/src/main/groovy/gaiden/BindingBuilder.groovy
+++ b/src/main/groovy/gaiden/BindingBuilder.groovy
@@ -61,7 +61,7 @@ class BindingBuilder {
     /**
      * Sets the page path.
      */
-    BindingBuilder setPageSource(String sourcePath) {
+    BindingBuilder setSourcePath(String sourcePath) {
         this.sourcePath = sourcePath
         this
     }
diff --git a/src/main/groovy/gaiden/PageBuilder.groovy b/src/main/groovy/gaiden/PageBuilder.groovy
index dcbee4d..f6a4e2c 100644
--- a/src/main/groovy/gaiden/PageBuilder.groovy
+++ b/src/main/groovy/gaiden/PageBuilder.groovy
@@ -60,7 +60,7 @@ class PageBuilder {
             .setContent(content)
             .setPageBuildContext(context)
             .setOutputPath(pageSource.outputPath)
-            .setPageSource(pageSource.path)
+            .setSourcePath(pageSource.path)
             .build()

         templateEngine.make(binding)
diff --git a/src/test/groovy/gaiden/TemplateEngineSpec.groovy b/src/test/groovy/gaiden/TemplateEngineSpec.groovy
index c2fdf38..91fd187 100644
--- a/src/test/groovy/gaiden/TemplateEngineSpec.groovy
+++ b/src/test/groovy/gaiden/TemplateEngineSpec.groovy
@@ -16,6 +16,8 @@

 package gaiden

+import gaiden.context.PageBuildContext
+
 class TemplateEngineSpec extends GaidenSpec {

     def "'make' should make a page with a template"() {
@@ -90,4 +92,39 @@ class TemplateEngineSpec extends GaidenSpec {
         "ccc/ddd.html" | "../toc.html"
     }

+    def "'make' should xxx"() {
+        setup:
+        def templateEngine = new TemplateEngine('$prevLink')
+
+        tocFile.write """
+            |"first.md"(title: 'first title')
+            |"second.md"(title: 'second title')
+            |"third.md"(title: 'third title')
+            """.stripMargin()
+
+        def context = createBuildContext([[path: "first.md"], [path: "second.md"], [path: "third.md"]])
+        Toc toc = new TocBuilder(templateEngine).build(context)
+
+        def pageBuildContext = new PageBuildContext()
+        pageBuildContext.toc = toc
+        pageBuildContext.documentSource = context.documentSource
+
+        def binding = new BindingBuilder()
+            .setSourcePath(sourcePath)
+            .setPageBuildContext(pageBuildContext)
+            .setOutputPath(outputPath)
+            .build()
+
+        when:
+        def content = templateEngine.make(binding)
+
+        then:
+        content == expected
+
+        where:
+        sourcePath  | outputPath    | expected
+        "first"     | "first.html"  | ""
+        "second.md" | "second.html" | "<a href='first.html' class='prev'>&lt;&lt; first title</a>"
+        "third.md"  | "third.html"  | "<a href='second.html' class='prev'>&lt;&lt; second title</a>"
+    }
 }