use "skip" instead of "if statement" whether Redcarpet is installed at markdown_formatter_test

git-svn-id: http://svn.redmine.org/redmine/trunk@20531 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2020-11-30 15:49:44 +00:00
parent 3788d6365c
commit 4fba0c5240

View File

@@ -20,9 +20,10 @@
require File.expand_path('../../../../../test_helper', __FILE__)
class Redmine::WikiFormatting::MarkdownFormatterTest < ActionView::TestCase
if Object.const_defined?(:Redcarpet)
def setup
unless Object.const_defined?(:Redcarpet)
skip "Redcarpet is not installed"
end
@formatter = Redmine::WikiFormatting::Markdown::Formatter
end
@@ -195,4 +196,3 @@ class Redmine::WikiFormatting::MarkdownFormatterTest < ActionView::TestCase
assert_equal Digest::MD5.hexdigest(expected), result.last, "section hash did not match"
end
end
end