fix tests for rdoc 3.0

This commit is contained in:
Konstantin Haase 2010-12-23 12:11:57 +01:00
parent 753d4b31c8
commit 9192432196
2 changed files with 6 additions and 2 deletions

View File

@ -53,6 +53,10 @@ class Test::Unit::TestCase
response.body.to_s
end
def assert_body(value)
assert_equal value.strip, body.strip
end
# Delegate other missing methods to response.
def method_missing(name, *args, &block)
if response && response.respond_to?(name)

View File

@ -15,13 +15,13 @@ class RdocTest < Test::Unit::TestCase
it 'renders inline rdoc strings' do
rdoc_app { rdoc '= Hiya' }
assert ok?
assert_equal "<h1>Hiya</h1>\n", body
assert_body "<h1>Hiya</h1>"
end
it 'renders .rdoc files in views path' do
rdoc_app { rdoc :hello }
assert ok?
assert_equal "<h1>Hello From RDoc</h1>\n", body
assert_body "<h1>Hello From RDoc</h1>"
end
it "raises error if template not found" do