From dedf696666ee70bc4729ba66e3a955428580b82b Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Tue, 3 May 2011 16:37:07 -0700 Subject: [PATCH] [#604] Add missing test for Liquid --- test/unit/lib/chili_project/liquid_test.rb | 211 +++++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 test/unit/lib/chili_project/liquid_test.rb diff --git a/test/unit/lib/chili_project/liquid_test.rb b/test/unit/lib/chili_project/liquid_test.rb new file mode 100644 index 00000000..2fb25020 --- /dev/null +++ b/test/unit/lib/chili_project/liquid_test.rb @@ -0,0 +1,211 @@ +#-- encoding: UTF-8 +#-- copyright +# ChiliProject is a project management system. +# +# Copyright (C) 2010-2011 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# See doc/COPYRIGHT.rdoc for more details. +#++ +require File.expand_path('../../../../test_helper', __FILE__) + +class ChiliProject::LiquidTest < ActionView::TestCase + include ApplicationHelper + + context "hello_world tag" do + should "render 'Hello world!'" do + text = "{% hello_world %}" + assert_match /Hello world!/, textilizable(text) + end + end + + context "variable_list tag" do + should "render a list of the current variables" do + text = "{% variable_list %}" + formatted = textilizable(text) + + assert formatted.include?('