Permalink
Browse files

Require the options arg for now

  • Loading branch information...
1 parent 476bc42 commit e6e0f558be5cc656485342aef43fc7eb59825d2e Scott Barron committed May 22, 2009
Showing with 2 additions and 3 deletions.
  1. +0 −1 lib/fake_web.rb
  2. +2 −2 test/test_fake_web.rb
View
@@ -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
@@ -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('/')

0 comments on commit e6e0f55

Please sign in to comment.