Module: Rapidash::TestClient
- Defined in:
- lib/rapidash/test_client.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#responses ⇒ Object
readonly
Returns the value of attribute responses.
-
#stubs ⇒ Object
readonly
Returns the value of attribute stubs.
Instance Method Summary collapse
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
27 28 29 |
# File 'lib/rapidash/test_client.rb', line 27 def json @json end |
#responses ⇒ Object (readonly)
Returns the value of attribute responses.
27 28 29 |
# File 'lib/rapidash/test_client.rb', line 27 def responses @responses end |
#stubs ⇒ Object (readonly)
Returns the value of attribute stubs.
27 28 29 |
# File 'lib/rapidash/test_client.rb', line 27 def stubs @stubs end |
Instance Method Details
#initialize(responses, options = {}) ⇒ Object
29 30 31 32 33 |
# File 'lib/rapidash/test_client.rb', line 29 def initialize(responses, = {}) @json = [:json] || false @responses = responses build_stubs end |
#request(verb, url, options = {}) ⇒ Object
35 36 37 |
# File 'lib/rapidash/test_client.rb', line 35 def request(verb, url, = {}) connection.send(verb, url, ).body end |