Module: Inferno::DSL::RequestStorage::ClassMethods

Defined in:
lib/inferno/dsl/request_storage.rb

Instance Method Summary collapse

Instance Method Details

#incoming_request_nameObject



122
123
124
# File 'lib/inferno/dsl/request_storage.rb', line 122

def incoming_request_name
  @incoming_request_name
end

#makes_request(*identifiers) ⇒ void

This method returns an undefined value.

Specify the named requests made by a test

Parameters:

  • identifiers (Symbol)

    one or more request identifiers



105
106
107
108
109
110
# File 'lib/inferno/dsl/request_storage.rb', line 105

def makes_request(*identifiers)
  named_requests_made.concat(identifiers).uniq!
  identifiers.each do |identifier|
    config.add_request(identifier)
  end
end

#named_requests_madeObject



92
93
94
# File 'lib/inferno/dsl/request_storage.rb', line 92

def named_requests_made
  @named_requests_made ||= []
end

#named_requests_usedObject



97
98
99
# File 'lib/inferno/dsl/request_storage.rb', line 97

def named_requests_used
  @named_requests_used ||= []
end

#receives_request(identifier) ⇒ void

This method returns an undefined value.

Specify the name for a request received by a test

Parameters:

  • identifier (Symbol)


116
117
118
119
# File 'lib/inferno/dsl/request_storage.rb', line 116

def receives_request(identifier)
  config.add_request(identifier)
  @incoming_request_name = identifier
end

#uses_request(*identifiers) ⇒ void

This method returns an undefined value.

Specify the named requests used by a test

Parameters:

  • identifiers (Symbol)

    one or more request identifiers



130
131
132
133
134
135
# File 'lib/inferno/dsl/request_storage.rb', line 130

def uses_request(*identifiers)
  named_requests_used.concat(identifiers).uniq!
  identifiers.each do |identifier|
    config.add_request(identifier)
  end
end