From 656dcca3d293c312ea3efdf719427c9d1ef0bd86 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Sat, 22 Jun 2013 15:47:59 +0200 Subject: [PATCH] Add a cucumber test for passing variables --- features/include_tag.feature | 3 +++ 1 file changed, 3 insertions(+) diff --git a/features/include_tag.feature b/features/include_tag.feature index 617c8718..66f9d4a6 100644 --- a/features/include_tag.feature +++ b/features/include_tag.feature @@ -17,6 +17,7 @@ Feature: Include tags | Dont keep parameters | 2013-03-21 | default | {% include ignore.html param="test" %}\n{% include header.html %} | | Allow params with spaces and quotes | 2013-04-07 | default | {% include params.html cool="param with spaces" super="\"quoted\"" single='has "quotes"' escaped='\'single\' quotes' %} | | Parameter syntax | 2013-04-12 | default | {% include params.html param1_or_2="value" %} | + | Pass a variable | 2013-06-22 | default | {% assign var = 'some text' %}{% include params.html local=var layout=page.layout %} | When I run jekyll Then the _site directory should exist And I should see "
My awesome blog header: myparam
" in "_site/2013/03/21/include-files.html" @@ -30,3 +31,5 @@ Feature: Include tags And I should see "
  • single = has “quotes”
  • " in "_site/2013/04/07/allow-params-with-spaces-and-quotes.html" And I should see "
  • escaped = ‘single’ quotes
  • " in "_site/2013/04/07/allow-params-with-spaces-and-quotes.html" And I should see "
  • param1_or_2 = value
  • " in "_site/2013/04/12/parameter-syntax.html" + And I should see "
  • local = some text
  • " in "_site/2013/06/22/pass-a-variable.html" + And I should see "
  • layout = default
  • " in "_site/2013/06/22/pass-a-variable.html"