Skip to content

Commit

Permalink
Moved FakeWeb::Response to separate file.
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles committed Jan 4, 2009
1 parent e779592 commit 4cf37ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 1 addition & 8 deletions lib/fake_web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require 'fake_net_http'
require 'fake_web/registry'
require 'fake_web/response'

module OpenURI #:nodoc: all
class HTTPError < StandardError; end;
Expand Down Expand Up @@ -148,14 +149,6 @@ def self.registered_uri?(*args)
Registry.instance.registered_uri?(method, uri)
end


module Response #:nodoc:
def read_body(*args, &block)
yield @body if block_given?
@body
end
end

class Responder #:nodoc:

attr_accessor :method, :uri, :options, :times
Expand Down
8 changes: 8 additions & 0 deletions lib/fake_web/response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module FakeWeb
module Response #:nodoc:
def read_body(*args, &block)
yield @body if block_given?
@body
end
end
end

0 comments on commit 4cf37ba

Please sign in to comment.