Module: SharkOnLambda::RSpec::Helpers
- Included in:
- JsonapiHelpers
- Defined in:
- lib/shark_on_lambda/rspec/helpers.rb
Instance Method Summary collapse
- #delete(controller_method, options = {}) ⇒ Object
- #get(controller_method, options = {}) ⇒ Object
- #patch(controller_method, options = {}) ⇒ Object
- #post(controller_method, options = {}) ⇒ Object
- #put(controller_method, options = {}) ⇒ Object
- #response ⇒ Object
Instance Method Details
#delete(controller_method, options = {}) ⇒ Object
6 7 8 |
# File 'lib/shark_on_lambda/rspec/helpers.rb', line 6 def delete(controller_method, = {}) make_request('DELETE', controller_method, ) end |
#get(controller_method, options = {}) ⇒ Object
10 11 12 |
# File 'lib/shark_on_lambda/rspec/helpers.rb', line 10 def get(controller_method, = {}) make_request('GET', controller_method, ) end |
#patch(controller_method, options = {}) ⇒ Object
14 15 16 |
# File 'lib/shark_on_lambda/rspec/helpers.rb', line 14 def patch(controller_method, = {}) make_request('PATCH', controller_method, ) end |
#post(controller_method, options = {}) ⇒ Object
18 19 20 |
# File 'lib/shark_on_lambda/rspec/helpers.rb', line 18 def post(controller_method, = {}) make_request('POST', controller_method, ) end |
#put(controller_method, options = {}) ⇒ Object
22 23 24 |
# File 'lib/shark_on_lambda/rspec/helpers.rb', line 22 def put(controller_method, = {}) make_request('PUT', controller_method, ) end |
#response ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/shark_on_lambda/rspec/helpers.rb', line 26 def response if @response.nil? raise 'You must make a request before you can request a response.' end @response end |