Permalink
Browse files

fix tests for rdoc 3.0

  • Loading branch information...
1 parent 1969650 commit 8c070a79ad79e199c42ca397ded2d7f5270acd10 @rkh rkh committed Dec 23, 2010
Showing with 6 additions and 2 deletions.
  1. +4 −0 test/helper.rb
  2. +2 −2 test/rdoc_test.rb
View
@@ -53,6 +53,10 @@ def body
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
@@ -15,13 +15,13 @@ def rdoc_app(&block)
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

0 comments on commit 8c070a7

Please sign in to comment.