[DRE-commits] [ruby-webmock] 01/05: reverse all patches in master
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Mon Apr 14 04:42:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository ruby-webmock.
commit 4d877e4c0aabcb69da6d207360b729fdd97527d2
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Mon Apr 14 09:48:20 2014 +0530
reverse all patches in master
---
lib/webmock/http_lib_adapters/curb_adapter.rb | 3 +--
lib/webmock/test_unit.rb | 9 +++++----
minitest/test_helper.rb | 8 ++++----
spec/acceptance/excon/excon_spec.rb | 4 ++--
spec/acceptance/net_http/real_net_http_spec.rb | 4 ++--
spec/acceptance/patron/patron_spec.rb | 1 -
spec/spec_helper.rb | 7 +++----
test/test_helper.rb | 6 +++---
test/test_webmock.rb | 2 +-
9 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/lib/webmock/http_lib_adapters/curb_adapter.rb b/lib/webmock/http_lib_adapters/curb_adapter.rb
index d40afc2..810d008 100644
--- a/lib/webmock/http_lib_adapters/curb_adapter.rb
+++ b/lib/webmock/http_lib_adapters/curb_adapter.rb
@@ -5,8 +5,7 @@ rescue LoadError
end
if defined?(Curl)
-# debian/control has ruby-curb >= 0.7.16 as build dependency
-# WebMock::VersionChecker.new('Curb', Curl::CURB_VERSION, '0.7.16').check_version!
+ WebMock::VersionChecker.new('Curb', Curl::CURB_VERSION, '0.7.16').check_version!
module WebMock
module HttpLibAdapters
diff --git a/lib/webmock/test_unit.rb b/lib/webmock/test_unit.rb
index 0571971..06fe820 100644
--- a/lib/webmock/test_unit.rb
+++ b/lib/webmock/test_unit.rb
@@ -1,9 +1,9 @@
-#require 'test/unit'
-require 'minitest/autorun'
+require 'test/unit'
require 'webmock'
-module Minitest
- class Test
+module Test
+ module Unit
+ class TestCase
include WebMock::API
alias_method :teardown_without_webmock, :teardown
@@ -14,6 +14,7 @@ module Minitest
alias_method :teardown, :teardown_with_webmock
end
+ end
end
WebMock::AssertionFailure.error_class = Test::Unit::AssertionFailedError rescue MiniTest::Assertion # ruby1.9 compat
diff --git a/minitest/test_helper.rb b/minitest/test_helper.rb
index 51a40c8..5ea5bd8 100644
--- a/minitest/test_helper.rb
+++ b/minitest/test_helper.rb
@@ -1,11 +1,11 @@
-# require 'rubygems'
+require 'rubygems'
-# $LOAD_PATH.unshift(File.dirname(__FILE__))
-# $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.expand_path(File.dirname(__FILE__) + '/../test/http_request')
-# gem 'minitest'
+gem 'minitest'
require 'minitest/autorun'
require 'webmock/minitest'
diff --git a/spec/acceptance/excon/excon_spec.rb b/spec/acceptance/excon/excon_spec.rb
index 175a4f8..4e552af 100644
--- a/spec/acceptance/excon/excon_spec.rb
+++ b/spec/acceptance/excon/excon_spec.rb
@@ -17,7 +17,7 @@ describe "Excon" do
end
context "with response_block" do
- xit "should support excon response_block for real requests" do
+ it "should support excon response_block for real requests" do
a = []
WebMock.allow_net_connect!
r = Excon.new('http://httpstat.us/200').get(:response_block => lambda {|e, remaining, total| a << e}, :chunk_size => 1)
@@ -33,7 +33,7 @@ describe "Excon" do
r.body.should == ""
end
- xit "should invoke callbacks with response body even if a real request is made" do
+ it "should invoke callbacks with response body even if a real request is made" do
a = []
WebMock.allow_net_connect!
response = nil
diff --git a/spec/acceptance/net_http/real_net_http_spec.rb b/spec/acceptance/net_http/real_net_http_spec.rb
index c6315d1..29359b6 100644
--- a/spec/acceptance/net_http/real_net_http_spec.rb
+++ b/spec/acceptance/net_http/real_net_http_spec.rb
@@ -1,4 +1,4 @@
-#require 'rubygems'
+require 'rubygems'
require 'rspec'
require 'net/http'
require 'net/https'
@@ -17,4 +17,4 @@ describe "Real Net:HTTP without webmock", :without_webmock => true do
end
it_should_behave_like "Net::HTTP"
-end
+end
\ No newline at end of file
diff --git a/spec/acceptance/patron/patron_spec.rb b/spec/acceptance/patron/patron_spec.rb
index 51ab89e..94e8f7d 100644
--- a/spec/acceptance/patron/patron_spec.rb
+++ b/spec/acceptance/patron/patron_spec.rb
@@ -39,7 +39,6 @@ unless RUBY_PLATFORM =~ /java/
end
it "should raise same error as Patron if file is not readable for get request" do
- pending "patron causes ruby segfault, skiping..."
stub_request(:get, "www.example.com")
File.open("/tmp/read_only_file", "w") do |tmpfile|
tmpfile.chmod(0400)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 9a6147c..b3aec83 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,5 +1,4 @@
-# all dependencies are covered in debian/control
-# require 'rubygems'
+require 'rubygems'
require 'httpclient'
unless RUBY_PLATFORM =~ /java/
require 'curb'
@@ -8,8 +7,8 @@ unless RUBY_PLATFORM =~ /java/
require 'typhoeus'
end
-#$LOAD_PATH.unshift(File.dirname(__FILE__))
-#$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rspec'
require 'webmock/rspec'
diff --git a/test/test_helper.rb b/test/test_helper.rb
index fd8bd56..31bab38 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,7 +1,7 @@
-# require 'rubygems'
+require 'rubygems'
-# $LOAD_PATH.unshift(File.dirname(__FILE__))
-# $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'webmock/test_unit'
require 'test/unit'
diff --git a/test/test_webmock.rb b/test/test_webmock.rb
index 2bb6b69..b89753a 100644
--- a/test/test_webmock.rb
+++ b/test/test_webmock.rb
@@ -1,6 +1,6 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
require File.expand_path(File.dirname(__FILE__) + '/shared_test')
-class TestWebMock < Minitest::Test
+class TestWebMock < Test::Unit::TestCase
include SharedTest
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-webmock.git
More information about the Pkg-ruby-extras-commits
mailing list