class TCellAgent::Tests::MetaDataBuilder
Public Class Methods
new()
click to toggle source
# File spec/support/builders.rb, line 68 def initialize @meta_data = TCellAgent::MetaData.new( 'GET', '127.0.0.1', 'route-id', 'session-id', 'user-id', SecureRandom.uuid, 'http://domain.com/some/path?hide-my-value=sensitive', '0.0.0.0' ) @meta_data.path = '/some/path' @meta_data.request_content_bytes_len = 0 @meta_data.response_content_bytes_len = 0 @meta_data.response_code = 0 @meta_data.user_agent = 'user-agent' @meta_data.get_dict = {} @meta_data.cookie_dict = {} @meta_data.headers_dict = {} @meta_data.post_dict = {} @meta_data.path_parameters = {} request = Rack::Request.new({ 'CONTENT_TYPE' => 'text/html', 'rack.input' => {} }) @meta_data.set_parameter_dicts(request) end
Public Instance Methods
build()
click to toggle source
# File spec/support/builders.rb, line 100 def build @meta_data end
update_attribute(attribute, setting)
click to toggle source
# File spec/support/builders.rb, line 94 def update_attribute(attribute, setting) @meta_data.send("#{attribute}=", setting) self end