diff options
Diffstat (limited to 'dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-tests.patch')
-rw-r--r-- | dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-tests.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-tests.patch b/dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-tests.patch new file mode 100644 index 000000000000..540781f453a7 --- /dev/null +++ b/dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-tests.patch @@ -0,0 +1,43 @@ +commit 3d78b5ee6c18d5776ddf9c7d148158a3604f80e6 +Author: Tim Felgentreff <timfelgentreff@gmail.com> +Date: Mon Oct 10 19:50:59 2011 -0700 + + fix rdoc tests for 3.10 + +diff --git a/test/helper.rb b/test/helper.rb +index 1f061d4..dc8fd40 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 d28b16a..0d58856 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 "<h1>Hiya</h1>" ++ assert_body /<h1[^>]*>Hiya<\/h1>/ + end + + it 'renders .rdoc files in views path' do + rdoc_app { rdoc :hello } + assert ok? +- assert_body "<h1>Hello From RDoc</h1>" ++ assert_body /<h1[^>]*>Hello From RDoc<\/h1>/ + end + + it "raises error if template not found" do |