From 9192432196803aad05ea3e665bd94f7345372b47 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 23 Dec 2010 12:11:57 +0100 Subject: [PATCH] fix tests for rdoc 3.0 --- test/helper.rb | 4 ++++ test/rdoc_test.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index 2220ebca..7d969732 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -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) diff --git a/test/rdoc_test.rb b/test/rdoc_test.rb index 8762e3db..93a71a5d 100644 --- a/test/rdoc_test.rb +++ b/test/rdoc_test.rb @@ -15,13 +15,13 @@ class RdocTest < Test::Unit::TestCase it 'renders inline rdoc strings' do rdoc_app { rdoc '= Hiya' } assert ok? - assert_equal "

Hiya

\n", body + assert_body "

Hiya

" end it 'renders .rdoc files in views path' do rdoc_app { rdoc :hello } assert ok? - assert_equal "

Hello From RDoc

\n", body + assert_body "

Hello From RDoc

" end it "raises error if template not found" do