diff --git a/test/helper.rb b/test/helper.rb index 1f061d49..dc8fd405 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -69,7 +69,11 @@ class Test::Unit::TestCase end def assert_body(value) - assert_equal value.lstrip.gsub(/\s*\n\s*/, ""), body.lstrip.gsub(/\s*\n\s*/, "") + if value.respond_to? :to_str + assert_equal value.lstrip.gsub(/\s*\n\s*/, ""), body.lstrip.gsub(/\s*\n\s*/, "") + else + assert_match value, body + end end def assert_status(expected) diff --git a/test/rdoc_test.rb b/test/rdoc_test.rb index d28b16ad..0d588563 100644 --- a/test/rdoc_test.rb +++ b/test/rdoc_test.rb @@ -16,13 +16,13 @@ class RdocTest < Test::Unit::TestCase it 'renders inline rdoc strings' do rdoc_app { rdoc '= Hiya' } assert ok? - assert_body "