Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Require the options arg for now

  • Loading branch information...
commit e6e0f558be5cc656485342aef43fc7eb59825d2e 1 parent 476bc42
Scott Barron authored
Showing with 2 additions and 3 deletions.
  1. +0 −1  lib/fake_web.rb
  2. +2 −2 test/test_fake_web.rb
View
1  lib/fake_web.rb
@@ -110,7 +110,6 @@ def self.register_uri(*args, &block)
case args.length
when 3 then method, uri, options = *args
when 2 then uri, options = *args
- when 1 then uri = *args; options = {}
else raise ArgumentError.new("wrong number of arguments (#{args.length} for method = :any, uri, options)")
end
View
4 test/test_fake_web.rb
@@ -13,7 +13,7 @@ def test_register_uri
end
def test_register_uri_with_block
- FakeWeb.register_uri('http://mock/test_example.txt') { 'foo' }
+ FakeWeb.register_uri('http://mock/test_example.txt', {}) { 'foo' }
assert FakeWeb.registered_uri?('http://mock/test_example.txt')
end
@@ -139,7 +139,7 @@ def test_content_for_registered_uri_with_port_and_request_with_port
end
def test_content_for_registered_uri_with_block
- FakeWeb.register_uri('http://example.com:3000/') { |params| 'test example content' }
+ FakeWeb.register_uri('http://example.com:3000/', {}) { |params| 'test example content' }
Net::HTTP.start('example.com', 3000) do |http|
response = http.get('/')
Please sign in to comment.
Something went wrong with that request. Please try again.