- label
+ collection
|
From 441ac3742cfc7c5618ea77000cf46ac2cfc57259 Mon Sep 17 00:00:00 2001
From: Bud Parr
Date: Mon, 2 Jun 2014 15:05:03 -0400
Subject: [PATCH 6/7] remove extra space
---
lib/jekyll/document.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb
index 28d19478..248e6d15 100644
--- a/lib/jekyll/document.rb
+++ b/lib/jekyll/document.rb
@@ -207,7 +207,7 @@ module Jekyll
"path" => path,
"relative_path" => relative_path,
"url" => url,
- "collection" => collection.label
+ "collection" => collection.label
}
else
data
From dc622470c900c34aa1ac897deec8c3eebd2872af Mon Sep 17 00:00:00 2001
From: Bud Parr
Date: Mon, 2 Jun 2014 15:12:21 -0400
Subject: [PATCH 7/7] add test for collection name
---
test/test_document.rb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/test_document.rb b/test/test_document.rb
index 794c2117..672f7d2e 100644
--- a/test/test_document.rb
+++ b/test/test_document.rb
@@ -40,6 +40,10 @@ class TestDocument < Test::Unit::TestCase
}, @document.data)
end
+ should "output the collection name in the #to_liquid method" do
+ assert_equal @document.to_liquid['collection'], "methods"
+ end
+
end
context " a document part of a rendered collection" do
|