2008-11-25 00:59:27 +00:00
|
|
|
module Webrat #:nodoc:
|
2009-08-13 00:43:44 +00:00
|
|
|
def self.adapter_class #:nodoc:
|
2009-08-13 01:42:01 +00:00
|
|
|
TestAdapter
|
2008-11-23 05:22:49 +00:00
|
|
|
end
|
2008-12-30 02:19:13 +00:00
|
|
|
|
2009-08-13 01:42:01 +00:00
|
|
|
class TestAdapter #:nodoc:
|
2008-05-12 03:58:20 +00:00
|
|
|
attr_accessor :response_body
|
|
|
|
attr_writer :response_code
|
2008-12-30 02:19:13 +00:00
|
|
|
|
2009-08-13 01:42:01 +00:00
|
|
|
def initialize(*args)
|
|
|
|
end
|
|
|
|
|
2008-05-12 04:58:24 +00:00
|
|
|
def doc_root
|
|
|
|
File.expand_path(File.join(".", "public"))
|
|
|
|
end
|
2008-12-30 02:19:13 +00:00
|
|
|
|
2008-11-07 04:08:46 +00:00
|
|
|
def response
|
2008-12-30 03:45:55 +00:00
|
|
|
@response ||= Object.new
|
2008-11-07 04:08:46 +00:00
|
|
|
end
|
2008-12-30 02:19:13 +00:00
|
|
|
|
2008-05-12 03:58:20 +00:00
|
|
|
def response_code
|
|
|
|
@response_code || 200
|
|
|
|
end
|
2008-12-30 02:19:13 +00:00
|
|
|
|
|
|
|
def get(url, data, headers = nil)
|
|
|
|
end
|
|
|
|
|
|
|
|
def post(url, data, headers = nil)
|
2008-05-12 03:58:20 +00:00
|
|
|
end
|
2008-12-30 02:19:13 +00:00
|
|
|
|
|
|
|
def put(url, data, headers = nil)
|
2008-05-12 03:58:20 +00:00
|
|
|
end
|
2008-12-30 02:19:13 +00:00
|
|
|
|
|
|
|
def delete(url, data, headers = nil)
|
2008-05-12 03:58:20 +00:00
|
|
|
end
|
2008-12-30 02:19:13 +00:00
|
|
|
end
|
2009-04-08 00:30:12 +00:00
|
|
|
end
|