Module: Answers::Testing::ControllerMacros::Methods
- Defined in:
- lib/answers/testing/controller_macros/methods.rb
Instance Method Summary collapse
-
#delete(action, options = {}) ⇒ Object
Executes a request simulating DELETE HTTP method and set/volley the response.
- #get(action, options = {}) ⇒ Object
-
#patch(action, options = {}) ⇒ Object
Executes a request simulating PATCH HTTP method and set/volley the response.
-
#post(action, options = {}) ⇒ Object
Executes a request simulating POST HTTP method and set/volley the response.
-
#put(action, options = {}) ⇒ Object
Executes a request simulating PUT HTTP method and set/volley the response.
Instance Method Details
#delete(action, options = {}) ⇒ Object
Executes a request simulating DELETE HTTP method and set/volley the response
25 26 27 |
# File 'lib/answers/testing/controller_macros/methods.rb', line 25 def delete(action, = {}) process_answers_action(action, 'DELETE', ) end |
#get(action, options = {}) ⇒ Object
5 6 7 |
# File 'lib/answers/testing/controller_macros/methods.rb', line 5 def get(action, = {}) process_answers_action(action, 'GET', ) end |
#patch(action, options = {}) ⇒ Object
Executes a request simulating PATCH HTTP method and set/volley the response
20 21 22 |
# File 'lib/answers/testing/controller_macros/methods.rb', line 20 def patch(action, = {}) process_answers_action(action, 'PATCH', ) end |
#post(action, options = {}) ⇒ Object
Executes a request simulating POST HTTP method and set/volley the response
10 11 12 |
# File 'lib/answers/testing/controller_macros/methods.rb', line 10 def post(action, = {}) process_answers_action(action, 'POST', ) end |
#put(action, options = {}) ⇒ Object
Executes a request simulating PUT HTTP method and set/volley the response
15 16 17 |
# File 'lib/answers/testing/controller_macros/methods.rb', line 15 def put(action, = {}) process_answers_action(action, 'PUT', ) end |