lib/fake_mechanize/responder.rb in fake_mechanize-0.0.0 vs lib/fake_mechanize/responder.rb in fake_mechanize-0.0.1

- old
+ new

@@ -6,16 +6,16 @@ def error(args) if args[:method] @errors << ErrorRequest.new(args) else - [:head, :get, :post, :put, :delete].each do |method| + HttpVerbs.each do |method| @errors << ErrorRequest.new({:method => method}.merge(args)) end end end - [:head, :get, :post, :put, :delete].each do |method| + HttpVerbs.each do |method| module_eval <<-EOE, __FILE__, __LINE__ def #{method}(args = {}) @responses << Request.new({:method => :#{method}}.merge(args)) end EOE \ No newline at end of file