lib/stella/data/http.rb in stella-0.7.4.001 vs lib/stella/data/http.rb in stella-0.7.5.001
- old
+ new
@@ -12,42 +12,44 @@
# 304 => { ... }
# 500 => { ... }
#
attr_accessor :response_handler
- field :desc
+ field :description
field :header
field :uri
field :wait
field :params
field :body
field :http_method
field :http_version
field :content_type
field :http_auth
+ attic :description
+
def has_body?
!@body.nil?
end
def initialize (method, uri_str, version="1.1", &definition)
@uri = uri_str
@http_method, @http_version = method, version
@headers, @params, @response_handler = {}, {}, {}
@resources = {}
@wait = 0
- @desc = "Request"
+ self.description = "Request"
instance_eval &definition unless definition.nil?
end
def auth(user=nil, pass=nil, kind=:basic)
@http_auth ||= Stella::Testplan::Usecase::Auth.new
@http_auth.user, @http_auth.pass, @http_auth.kind = user, pass, kind
end
def desc(*args)
- @desc = args.first unless args.empty?
- @desc
+ self.description = args.first unless args.empty?
+ self.description
end
def content_type(*args)
@content_type = args.first unless args.empty?
@content_type
\ No newline at end of file