From 7e7cee6e56595cd17e88e767bb6aaf590584997f Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 24 Feb 2013 00:57:58 +0100 Subject: [PATCH] Strip space from the gist number, add test for gist tag --- lib/jekyll/tags/gist.rb | 4 ++-- test/test_tags.rb | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/tags/gist.rb b/lib/jekyll/tags/gist.rb index e7d79302..f881dd56 100644 --- a/lib/jekyll/tags/gist.rb +++ b/lib/jekyll/tags/gist.rb @@ -7,11 +7,11 @@ module Jekyll class GistTag < Liquid::Tag def initialize(tag_name, gist, tokens) super - @gist = gist + @gist = gist.strip end def render(context) - "" + "" end end end diff --git a/test/test_tags.rb b/test/test_tags.rb index 3d97410b..f58475b0 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -203,4 +203,22 @@ CONTENT assert_match %r{/2008/11/21/complex/}, @result end end + + context "simple gist inclusion" do + setup do + @gist = 358471 + content = < 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true}) + end + + should "write script tag" do + assert_match %r{}, @result + end + end end