test/functional/for_redcloth.rb in coderay-1.0.0.800pre vs test/functional/for_redcloth.rb in coderay-1.0.0.815pre

- old
+ new

@@ -1,7 +1,9 @@ require 'test/unit' -$:.unshift 'lib' +require File.expand_path('../../lib/assert_warning', __FILE__) + +$:.unshift File.expand_path('../../../lib', __FILE__) require 'coderay' begin require 'rubygems' unless defined? Gem gem 'RedCloth', '>= 4.0.3' rescue nil @@ -62,17 +64,21 @@ end # 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