Sha256: 11f378d3f40acf54688b85bb333b02c46476d24c178ef2b6200d60bdb16901b3

Contents?: true

Size: 1.66 KB

Versions: 15

Compression:

Stored size: 1.66 KB

Contents

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
soaspec-0.2.23 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.22 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.21 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.20 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.19 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.18 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.17 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.16 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.15 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.14 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.13 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.12 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.11 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.10 lib/soaspec/exchange_handlers/rest_methods.rb
soaspec-0.2.9 lib/soaspec/exchange_handlers/rest_methods.rb