summaryrefslogtreecommitdiff
path: root/test/functional/for_redcloth.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2011-08-19 03:09:35 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2011-08-19 03:09:35 +0200
commit75bc5455af8c3c3381066aac3d5fff42264cac6f (patch)
tree589d2c912ddd94c517eb794bcdf3257f8348f3c0 /test/functional/for_redcloth.rb
parentfdd17b6a09efb275238a3baef275465d31452f2a (diff)
downloadcoderay-75bc5455af8c3c3381066aac3d5fff42264cac6f.tar.gz
Major rewrite of encoders to support IO output; fixed some minor scanner bugs; cleanups; dropped NitroXHTML scanner; improved tests
Diffstat (limited to 'test/functional/for_redcloth.rb')
-rw-r--r--test/functional/for_redcloth.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/functional/for_redcloth.rb b/test/functional/for_redcloth.rb
index 8c6491d..3c45eec 100644
--- a/test/functional/for_redcloth.rb
+++ b/test/functional/for_redcloth.rb
@@ -1,5 +1,7 @@
require 'test/unit'
-$:.unshift 'lib'
+require File.expand_path('../../lib/assert_warning', __FILE__)
+
+$:.unshift File.expand_path('../../../lib', __FILE__)
require 'coderay'
begin
@@ -64,15 +66,19 @@ class BasicTest < Test::Unit::TestCase
# See http://jgarber.lighthouseapp.com/projects/13054/tickets/124-code-markup-does-not-allow-brackets.
def test_for_redcloth_false_positive
require 'coderay/for_redcloth'
- assert_equal '<p><code>[project]_dff.skjd</code></p>',
- RedCloth.new('@[project]_dff.skjd@').to_html
+ assert_warning 'CodeRay::Scanners could not load plugin :project; falling back to :text' do
+ assert_equal '<p><code>[project]_dff.skjd</code></p>',
+ RedCloth.new('@[project]_dff.skjd@').to_html
+ end
# false positive, but expected behavior / known issue
assert_equal "<p><span lang=\"ruby\" class=\"CodeRay\">_dff.skjd</span></p>",
RedCloth.new('@[ruby]_dff.skjd@').to_html
- assert_equal <<-BLOCKCODE.chomp,
+ assert_warning 'CodeRay::Scanners could not load plugin :project; falling back to :text' do
+ assert_equal <<-BLOCKCODE.chomp,
<pre><code>[project]_dff.skjd</code></pre>
- BLOCKCODE
- RedCloth.new('bc. [project]_dff.skjd').to_html
+ BLOCKCODE
+ RedCloth.new('bc. [project]_dff.skjd').to_html
+ end
end
end if defined? RedCloth \ No newline at end of file