From 036c3a56b4c53691c28702c001a92e0e36ddc27e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 3 Dec 2011 15:29:51 +0000 Subject: Adds a test for macro registration. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8054 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/lib/redmine/wiki_formatting/macros_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb index 704e74528..e6f06489c 100644 --- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb @@ -39,6 +39,17 @@ class Redmine::WikiFormatting::MacrosTest < ActionView::TestCase def teardown end + def test_macro_registration + Redmine::WikiFormatting::Macros.register do + macro :foo do + "Foo macro output" + end + end + + text = "{{foo}}" + assert_equal '

Foo macro output

', textilizable(text) + end + def test_macro_hello_world text = "{{hello_world}}" assert textilizable(text).match(/Hello world!/) -- cgit v1.2.3