[DRE-commits] [ruby-fakeweb] 07/07: extend deactivate_google_tests.patch

Cédric Boutillier boutil at moszumanska.debian.org
Fri May 2 14:44:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-fakeweb.

commit 584c9dd1e77d5abf990aca5a34149f72368711d1
Author: Cédric Boutillier <boutil at debian.org>
Date:   Fri May 2 16:39:23 2014 +0200

    extend deactivate_google_tests.patch
---
 debian/patches/deactivate_google_tests.patch | 53 +++++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/debian/patches/deactivate_google_tests.patch b/debian/patches/deactivate_google_tests.patch
index e513ed5..889ef4a 100644
--- a/debian/patches/deactivate_google_tests.patch
+++ b/debian/patches/deactivate_google_tests.patch
@@ -48,7 +48,7 @@ Last-Update: 2014-05-02
      FakeWeb.register_uri(:get, 'http://www.google.com/', :response => fixture_path("google_response_from_curl"))
      response = Net::HTTP.start('www.google.com') { |query| query.get('/') }
      assert_not_nil response['transfer-encoding']
-@@ -580,7 +580,7 @@
+@@ -580,14 +580,14 @@
      assert_equal options_before_request, options
    end
  
@@ -57,6 +57,14 @@ Last-Update: 2014-05-02
      path = Pathname.new(fixture_path("google_response_without_transfer_encoding"))
      FakeWeb.register_uri(:get, "http://google.com", :response => path)
      response = Net::HTTP.start("google.com") { |http| http.get("/") }
+     assert response.body.include?("<title>Google</title>")
+   end
+ 
+-  def test_registering_with_a_response_pointing_to_a_pathname_does_not_modify_options
++  def _test_registering_with_a_response_pointing_to_a_pathname_does_not_modify_options
+     path = Pathname.new(fixture_path("google_response_without_transfer_encoding"))
+     options = {:response => path}
+     options_before_request = options.dup
 --- a/test/test_missing_pathname.rb
 +++ b/test/test_missing_pathname.rb
 @@ -22,7 +22,7 @@
@@ -68,3 +76,46 @@ Last-Update: 2014-05-02
      FakeWeb.register_uri(:get, "http://example.com/", :response => fixture_path("google_response_without_transfer_encoding"))
      Net::HTTP.start("example.com") { |http| http.get("/") }
    end
+--- a/test/test_registering_with_io.rb
++++ b/test/test_registering_with_io.rb
+@@ -2,35 +2,35 @@
+ 
+ class TestRegisteringWithIO < Test::Unit::TestCase
+ 
+-  def test_registering_a_file_handle_without_transfer_encoding
++  def _test_registering_a_file_handle_without_transfer_encoding
+     file = File.new(fixture_path("google_response_without_transfer_encoding"))
+     FakeWeb.register_uri(:get, "http://google.com", :response => file)
+     response = Net::HTTP.start("google.com") { |query| query.get('/') }
+     assert response.body.include?("<title>Google</title>")
+   end
+ 
+-  def test_registering_a_file_handle_with_transfer_encoding
++  def _test_registering_a_file_handle_with_transfer_encoding
+     file = File.new(fixture_path("google_response_with_transfer_encoding"))
+     FakeWeb.register_uri(:get, "http://google.com", :response => file)
+     response = Net::HTTP.start("google.com") { |query| query.get('/') }
+     assert response.body.include?("<title>Google</title>")
+   end
+ 
+-  def test_registering_a_file_handle_from_curl
++  def _test_registering_a_file_handle_from_curl
+     file = File.new(fixture_path("google_response_from_curl"))
+     FakeWeb.register_uri(:get, "http://google.com", :response => file)
+     response = Net::HTTP.start("google.com") { |query| query.get('/') }
+     assert response.body.include?("<title>Google</title>")
+   end
+ 
+-  def test_registering_a_stringio
++  def _test_registering_a_stringio
+     stringio = StringIO.new(File.read(fixture_path("google_response_from_curl")))
+     FakeWeb.register_uri(:get, "http://google.com", :response => stringio)
+     response = Net::HTTP.start("google.com") { |query| query.get('/') }
+     assert response.body.include?("<title>Google</title>")
+   end
+ 
+-  def test_creating_net_buffered_io_directly_with_an_unsupported_underlying_object
++  def _test_creating_net_buffered_io_directly_with_an_unsupported_underlying_object
+     # It's not possible to exercise this code path through an end-user API because
+     # FakeWeb::Responder performs an equivalent check on the object before passing
+     # it on to Net::BufferedIO. So this is just an internal sanity check.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-fakeweb.git



More information about the Pkg-ruby-extras-commits mailing list