2008-05-12 03:58:20 +00:00
|
|
|
module Webrat
|
2008-11-23 05:22:49 +00:00
|
|
|
def self.session_class
|
|
|
|
TestSession
|
|
|
|
end
|
|
|
|
|
2008-05-12 03:58:20 +00:00
|
|
|
class TestSession < Session
|
|
|
|
attr_accessor :response_body
|
|
|
|
attr_writer :response_code
|
|
|
|
|
2008-05-12 04:58:24 +00:00
|
|
|
def doc_root
|
|
|
|
File.expand_path(File.join(".", "public"))
|
|
|
|
end
|
|
|
|
|
2008-11-07 04:08:46 +00:00
|
|
|
def response
|
|
|
|
@response ||= Object.new
|
|
|
|
end
|
|
|
|
|
2008-05-12 03:58:20 +00:00
|
|
|
def response_code
|
|
|
|
@response_code || 200
|
|
|
|
end
|
|
|
|
|
|
|
|
def get(url, data)
|
|
|
|
end
|
|
|
|
|
|
|
|
def post(url, data)
|
|
|
|
end
|
|
|
|
|
|
|
|
def put(url, data)
|
|
|
|
end
|
|
|
|
|
|
|
|
def delete(url, data)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|