Class: Apis::Adapter::RackTest
- Includes:
- Rack::Test::Methods
- Defined in:
- lib/apis/adapter/rack_test.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#last_headers ⇒ Object
readonly
Returns the value of attribute last_headers.
-
#last_params ⇒ Object
readonly
Returns the value of attribute last_params.
-
#last_path ⇒ Object
readonly
Returns the value of attribute last_path.
Attributes inherited from Abstract
Instance Method Summary collapse
Methods inherited from Abstract
Constructor Details
This class inherits a constructor from Apis::Adapter::Abstract
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
8 9 10 |
# File 'lib/apis/adapter/rack_test.rb', line 8 def app @app end |
#last_headers ⇒ Object (readonly)
Returns the value of attribute last_headers.
10 11 12 |
# File 'lib/apis/adapter/rack_test.rb', line 10 def last_headers @last_headers end |
#last_params ⇒ Object (readonly)
Returns the value of attribute last_params.
10 11 12 |
# File 'lib/apis/adapter/rack_test.rb', line 10 def last_params @last_params end |
#last_path ⇒ Object (readonly)
Returns the value of attribute last_path.
10 11 12 |
# File 'lib/apis/adapter/rack_test.rb', line 10 def last_path @last_path end |
Instance Method Details
#run(method, path, params = {}, headers = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/apis/adapter/rack_test.rb', line 12 def run(method, path, params = {}, headers = {}) @last_path, @last_params, @last_headers = path, params, headers send(method, path, params, headers) [last_response.status, last_response.headers, last_response.body] end |