[DRE-commits] [ruby-fakeweb] 12/13: deactivate tests using test/fixtures/google_response*

Cédric Boutillier boutil at alioth.debian.org
Fri Oct 4 16:36:03 UTC 2013


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

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

commit 2f796f5ced20296d4fb26cc1507435e6448e4ace
Author: Cédric Boutillier <boutil at debian.org>
Date:   Fri Oct 4 18:07:48 2013 +0200

    deactivate tests using test/fixtures/google_response*
---
 debian/patches/deactivate_google_tests.patch |   70 ++++++++++++++++++++++++++
 debian/patches/series                        |    1 +
 2 files changed, 71 insertions(+)

diff --git a/debian/patches/deactivate_google_tests.patch b/debian/patches/deactivate_google_tests.patch
new file mode 100644
index 0000000..93ed908
--- /dev/null
+++ b/debian/patches/deactivate_google_tests.patch
@@ -0,0 +1,70 @@
+Description: deactivate tests using test/fixtures/google_response_*
+ those files have been deleted when repacking
+Forwarded: not-needed
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-10-04
+
+--- a/test/test_fake_web.rb
++++ b/test/test_fake_web.rb
+@@ -314,14 +314,14 @@
+     assert_equal fake_response, response
+   end
+ 
+-  def test_mock_get_with_request_from_file_as_registered_uri
++  def _test_mock_get_with_request_from_file_as_registered_uri
+     FakeWeb.register_uri(:get, 'http://www.google.com/', :response => fixture_path("google_response_without_transfer_encoding"))
+     response = Net::HTTP.start('www.google.com') { |query| query.get('/') }
+     assert_equal '200', response.code
+     assert response.body.include?('<title>Google</title>')
+   end
+ 
+-  def test_mock_post_with_request_from_file_as_registered_uri
++  def _test_mock_post_with_request_from_file_as_registered_uri
+     FakeWeb.register_uri(:post, 'http://www.google.com/', :response => fixture_path("google_response_without_transfer_encoding"))
+     response = Net::HTTP.start('www.google.com') { |query| query.post('/', '') }
+     assert_equal "200", response.code
+@@ -498,21 +498,21 @@
+     4.times { assert_equal 'ever_more',            Net::HTTP.get(uri) }
+   end
+ 
+-  def test_mock_request_using_response_with_transfer_encoding_header_has_valid_transfer_encoding_header
++  def _test_mock_request_using_response_with_transfer_encoding_header_has_valid_transfer_encoding_header
+     FakeWeb.register_uri(:get, 'http://www.google.com/', :response => fixture_path("google_response_with_transfer_encoding"))
+     response = Net::HTTP.start('www.google.com') { |query| query.get('/') }
+     assert_not_nil response['transfer-encoding']
+     assert response['transfer-encoding'] == 'chunked'
+   end
+ 
+-  def test_mock_request_using_response_without_transfer_encoding_header_does_not_have_a_transfer_encoding_header
++  def _test_mock_request_using_response_without_transfer_encoding_header_does_not_have_a_transfer_encoding_header
+     FakeWeb.register_uri(:get, 'http://www.google.com/', :response => fixture_path("google_response_without_transfer_encoding"))
+     response = nil
+     response = Net::HTTP.start('www.google.com') { |query| query.get('/') }
+     assert !response.key?('transfer-encoding')
+   end
+ 
+-  def test_mock_request_using_response_from_curl_has_original_transfer_encoding_header
++  def _test_mock_request_using_response_from_curl_has_original_transfer_encoding_header
+     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']
+@@ -564,7 +564,7 @@
+     assert_equal "test example content", response.body
+   end
+ 
+-  def test_registering_with_a_response_pointing_to_a_pathname
++  def _test_registering_with_a_response_pointing_to_a_pathname
+     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("/") }
+--- a/test/test_missing_pathname.rb
++++ b/test/test_missing_pathname.rb
+@@ -22,7 +22,7 @@
+     Net::HTTP.start("example.com") { |http| http.get("/") }
+   end
+ 
+-  def test_register_using_response_without_pathname
++  def _test_register_using_response_without_pathname
+     FakeWeb.register_uri(:get, "http://example.com/", :response => fixture_path("google_response_without_transfer_encoding"))
+     Net::HTTP.start("example.com") { |http| http.get("/") }
+   end
diff --git a/debian/patches/series b/debian/patches/series
index 6523e8a..e3e6747 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fix_tests_ruby2.0.patch
+deactivate_google_tests.patch

-- 
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