rubyist-fakeweb 1.2.2 → 1.2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,9 +51,7 @@ module Net #:nodoc: all
51
51
 
52
52
  if FakeWeb.registered_uri?(method, uri)
53
53
  @socket = Net::HTTP.socket_type.new
54
- if method == :put
55
- request.body = body
56
- end
54
+ request.body = body if body
57
55
  FakeWeb.response_for(request, method, uri, &block)
58
56
  elsif FakeWeb.allow_net_connect?
59
57
  connect_without_fakeweb
@@ -266,8 +266,9 @@ class TestFakeWeb < Test::Unit::TestCase
266
266
  assert_equal({'foo' => 'bar'}, params)
267
267
  ''
268
268
  end
269
-
270
- Net::HTTP.post_form(URI.parse('http://example.com/'), {'foo' => 'bar'})
269
+
270
+ http = Net::HTTP.new("example.com", 80)
271
+ http.post("/", "foo=bar", {})
271
272
  end
272
273
 
273
274
  def test_params_for_registered_uri_with_block_using_post_without_params
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyist-fakeweb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blaine Cook
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-05-04 00:00:00 -07:00
13
+ date: 2009-06-02 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency