Class: Ace::TestSupport::Fixtures::HTTPMocks::MockResponse
- Inherits:
-
Object
- Object
- Ace::TestSupport::Fixtures::HTTPMocks::MockResponse
- Defined in:
- lib/ace/test_support/fixtures/http_mocks.rb
Overview
Mock HTTP response object
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(success:, status:, body:) ⇒ MockResponse
constructor
A new instance of MockResponse.
- #success? ⇒ Boolean
Constructor Details
#initialize(success:, status:, body:) ⇒ MockResponse
Returns a new instance of MockResponse.
71 72 73 74 75 |
# File 'lib/ace/test_support/fixtures/http_mocks.rb', line 71 def initialize(success:, status:, body:) @success = success @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
69 70 71 |
# File 'lib/ace/test_support/fixtures/http_mocks.rb', line 69 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
69 70 71 |
# File 'lib/ace/test_support/fixtures/http_mocks.rb', line 69 def status @status end |
Instance Method Details
#success? ⇒ Boolean
77 78 79 |
# File 'lib/ace/test_support/fixtures/http_mocks.rb', line 77 def success? @success end |