Class: StubResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/brine/test_steps.rb

Direct Known Subclasses

DelayedStubResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStubResponse

Returns a new instance of StubResponse.

[View source]

15
16
17
18
19
# File 'lib/brine/test_steps.rb', line 15

def initialize
  @body = ''
  @status = 200
  @headers = {}
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.


13
14
15
# File 'lib/brine/test_steps.rb', line 13

def body
  @body
end

#headersObject

Returns the value of attribute headers.


13
14
15
# File 'lib/brine/test_steps.rb', line 13

def headers
  @headers
end

#statusObject

Returns the value of attribute status.


13
14
15
# File 'lib/brine/test_steps.rb', line 13

def status
  @status
end