Module: SerialSpec::RequestResponse::DSL
- Defined in:
- lib/serial_spec/request_response.rb
Instance Method Summary collapse
-
#request_method(new_method = nil) ⇒ Object
GET, POST, PUT, DELETE, OPTIONS, HEAD.
- #request_path(new_path = nil) ⇒ Object
Instance Method Details
#request_method(new_method = nil) ⇒ Object
GET, POST, PUT, DELETE, OPTIONS, HEAD
41 42 43 44 45 46 47 48 49 |
# File 'lib/serial_spec/request_response.rb', line 41 def request_method(new_method=nil) if new_method request_opts[:method] = new_method else methud = request_opts[:method] return methud if methud raise "You must configure a request method" end end |
#request_path(new_path = nil) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/serial_spec/request_response.rb', line 30 def request_path(new_path=nil) if new_path request_opts[:path] = new_path else path = request_opts[:path] return path if path raise "You must configure a path" end end |