lib/soaspec/exchange_handlers/rest_methods.rb in soaspec-0.0.81 vs lib/soaspec/exchange_handlers/rest_methods.rb in soaspec-0.0.82

- old
+ new

@@ -1,45 +1,45 @@ - -module Soaspec - # Contains commonly used REST methods - module RestMethods - # Make REST Post Exchange - # @param [String] name Name of test displayed - # @param [Hash] params Exchange parameters - # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body - def post(name, params = {}) - Exchange.new(name, method: :post, **params) - end - - # Make REST Patch Exchange - # @param [String] name Name of test displayed - # @param [Hash] params Exchange parameters - # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body - def patch(name, params = {}) - Exchange.new(name, method: :patch, **params) - end - - # Make REST Put Exchange - # @param [String] name Name of test displayed - # @param [Hash] params Exchange parameters - # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body - def put(name, params = {}) - Exchange.new(name, method: :put, **params) - end - - # Make REST Get Exchange - # @param [String] name Name of test displayed - # @param [Hash] params Exchange parameters - # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body - def get(name, params = {}) - Exchange.new(name, method: :get, **params) - end - - # Make REST Delete Exchange - # @param [String] name Name of test displayed - # @param [Hash] params Exchange parameters - # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body - def delete(name, params = {}) - Exchange.new(name, method: :delete, **params) - end - end + +module Soaspec + # Contains commonly used REST methods + module RestMethods + # Make REST Post Exchange + # @param [String] name Name of test displayed + # @param [Hash] params Exchange parameters + # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body + def post(name, params = {}) + Exchange.new(name, method: :post, **params) + end + + # Make REST Patch Exchange + # @param [String] name Name of test displayed + # @param [Hash] params Exchange parameters + # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body + def patch(name, params = {}) + Exchange.new(name, method: :patch, **params) + end + + # Make REST Put Exchange + # @param [String] name Name of test displayed + # @param [Hash] params Exchange parameters + # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body + def put(name, params = {}) + Exchange.new(name, method: :put, **params) + end + + # Make REST Get Exchange + # @param [String] name Name of test displayed + # @param [Hash] params Exchange parameters + # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body + def get(name, params = {}) + Exchange.new(name, method: :get, **params) + end + + # Make REST Delete Exchange + # @param [String] name Name of test displayed + # @param [Hash] params Exchange parameters + # @return [Exchange] Instance of Exchange class. Assertions are made by default on the response body + def delete(name, params = {}) + Exchange.new(name, method: :delete, **params) + end + end end \ No newline at end of file