fix tests for rdoc 3.0
This commit is contained in:
parent
753d4b31c8
commit
9192432196
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue