Module: Answers::Testing::ControllerMacros::Methods

Defined in:
lib/answers/testing/controller_macros/methods.rb

Instance Method Summary collapse

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, options = {})
  process_answers_action(action, 'DELETE', options)
end

#get(action, options = {}) ⇒ Object



5
6
7
# File 'lib/answers/testing/controller_macros/methods.rb', line 5

def get(action, options = {})
  process_answers_action(action, 'GET', options)
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, options = {})
  process_answers_action(action, 'PATCH', options)
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, options = {})
  process_answers_action(action, 'POST', options)
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, options = {})
  process_answers_action(action, 'PUT', options)
end