lib/fake_mechanize/responder.rb in fake_mechanize-0.0.1 vs lib/fake_mechanize/responder.rb in fake_mechanize-0.0.2
- old
+ new
@@ -1,10 +1,13 @@
module FakeMechanize
+ # Responder is a class responsible for creation of responses and errors requests.
class Responder
def initialize(responses, errors)
@responses, @errors = responses, errors
end
+ # Create a new error request. See ErrorRequest for options.
+ # If <tt>:method</tt> is omited, all http verbs can answer.
def error(args)
if args[:method]
@errors << ErrorRequest.new(args)
else
HttpVerbs.each do |method|
\ No newline at end of file