webrat/spec/fakes/test_adapter.rb

34 lines
526 B
Ruby
Raw Normal View History

2008-11-25 00:59:27 +00:00
module Webrat #:nodoc:
def self.adapter_class #:nodoc:
2009-08-13 01:42:01 +00:00
TestAdapter
2008-11-23 05:22:49 +00:00
end
2009-08-13 01:42:01 +00:00
class TestAdapter #:nodoc:
attr_accessor :response_body
attr_writer :response_code
2009-08-13 01:42:01 +00:00
def initialize(*args)
end
def response
@response ||= Object.new
end
def response_code
@response_code || 200
end
def get(url, data, headers = nil)
end
def post(url, data, headers = nil)
end
def put(url, data, headers = nil)
end
def delete(url, data, headers = nil)
end
end
2009-04-08 00:30:12 +00:00
end