Class: Fitting::Storage::Responses

Inherits:
Object
  • Object
show all
Defined in:
lib/fitting/storage/responses.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResponses

Returns a new instance of Responses.



8
9
10
# File 'lib/fitting/storage/responses.rb', line 8

def initialize
  @tested_requests = []
end

Instance Attribute Details

#tested_requestsObject (readonly)

Returns the value of attribute tested_requests.



6
7
8
# File 'lib/fitting/storage/responses.rb', line 6

def tested_requests
  @tested_requests
end

Instance Method Details

#add(response, example) ⇒ Object



12
13
14
# File 'lib/fitting/storage/responses.rb', line 12

def add(response, example)
  tested_requests.push(Fitting::Records::Tested::Request.new(response, example))
end

#testsObject



16
17
18
# File 'lib/fitting/storage/responses.rb', line 16

def tests
  Fitting::Tests.new(tested_requests)
end