Module: Alchemy::TestSupport::ControllerRequests
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/alchemy/test_support/controller_requests.rb
Instance Method Summary collapse
-
#alchemy_delete(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating DELETE HTTP method.
-
#alchemy_get(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating GET HTTP method.
-
#alchemy_post(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating POST HTTP method.
-
#alchemy_put(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating PUT HTTP method.
-
#alchemy_xhr(method, action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a simulated XHR request.
Instance Method Details
#alchemy_delete(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating DELETE HTTP method
49 50 51 |
# File 'lib/alchemy/test_support/controller_requests.rb', line 49 def alchemy_delete(action, parameters = nil, session = nil, flash = nil) process_alchemy_action(action, parameters, session, flash, "DELETE") end |
#alchemy_get(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating GET HTTP method
34 35 36 |
# File 'lib/alchemy/test_support/controller_requests.rb', line 34 def alchemy_get(action, parameters = nil, session = nil, flash = nil) process_alchemy_action(action, parameters, session, flash, "GET") end |
#alchemy_post(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating POST HTTP method
39 40 41 |
# File 'lib/alchemy/test_support/controller_requests.rb', line 39 def alchemy_post(action, parameters = nil, session = nil, flash = nil) process_alchemy_action(action, parameters, session, flash, "POST") end |
#alchemy_put(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating PUT HTTP method
44 45 46 |
# File 'lib/alchemy/test_support/controller_requests.rb', line 44 def alchemy_put(action, parameters = nil, session = nil, flash = nil) process_alchemy_action(action, parameters, session, flash, "PUT") end |
#alchemy_xhr(method, action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a simulated XHR request
54 55 56 |
# File 'lib/alchemy/test_support/controller_requests.rb', line 54 def alchemy_xhr(method, action, parameters = nil, session = nil, flash = nil) process_alchemy_xhr_action(method, action, parameters, session, flash) end |