Module: Soaspec

Defined in:
lib/soaspec.rb,
lib/soaspec/version.rb,
lib/soaspec/exe_helpers.rb,
lib/soaspec/spec_logger.rb,
lib/soaspec/test_server/get_bank.rb,
lib/soaspec/test_server/puppy_service.rb,
lib/soaspec/test_server/test_attribute.rb,
lib/soaspec/exchange_handlers/rest_handler.rb,
lib/soaspec/exchange_handlers/rest_methods.rb,
lib/soaspec/exchange_handlers/soap_handler.rb,
lib/soaspec/exchange_handlers/exchange_handler.rb,
lib/soaspec/exchange_handlers/handler_accessors.rb

Overview

Gem for handling SOAP and REST api tests

Defined Under Namespace

Modules: ExeHelpers, HandlerAccessors, RestAccessors, RestMethods, SoapAccessors, TestServer Classes: BasicSoapHandler, ExchangeHandler, RestHandler, SoapHandler, SpecLogger

Constant Summary collapse

VERSION =
'0.0.60'.freeze

Class Method Summary collapse

Class Method Details

.always_use_keys=(use_keys) ⇒ Object

Set whether to transform strings to keys in request automatically

Parameters:

  • use_keys (Boolean)


59
60
61
# File 'lib/soaspec.rb', line 59

def always_use_keys=(use_keys)
  @always_use_keys = use_keys
end

.always_use_keys?Boolean

Returns Whether to transform strings to keys in request automatically.

Returns:

  • (Boolean)

    Whether to transform strings to keys in request automatically



64
65
66
# File 'lib/soaspec.rb', line 64

def always_use_keys?
  @always_use_keys || true
end

.api_handlerObject

Exchange Handler class currently being used



53
54
55
# File 'lib/soaspec.rb', line 53

def api_handler
  @api_handler
end

.api_handler=(handler) ⇒ Object

Used so that exchange class knows what context it’s in

Parameters:

  • handler (ExchangeHandler)

    A class inheriting from Soaspec::ExchangeHandler. Exchange class uses this



48
49
50
# File 'lib/soaspec.rb', line 48

def api_handler=(handler)
  @api_handler = handler
end

.credentials_folderObject

Credentials folder used to store secret data (not in source control) E.g passwords



42
43
44
# File 'lib/soaspec.rb', line 42

def credentials_folder
  @credentials_folder
end

.credentials_folder=(folder) ⇒ Object

Folder used to store credentials Used in auth2_file command

Parameters:

  • folder (String)


37
38
39
# File 'lib/soaspec.rb', line 37

def credentials_folder=(folder)
  @credentials_folder = folder
end

.strip_namespaces=(remove_namespaces) ⇒ Object

Whether to remove namespaces from response in Xpath assertion automatically For why this may not be a good thing in general see tenderlovemaking.com/2009/04/23/namespaces-in-xml.html This will be overridden if xpath has a ‘:’ in it



72
73
74
# File 'lib/soaspec.rb', line 72

def strip_namespaces=(remove_namespaces)
  @strip_namespaces = remove_namespaces
end

.strip_namespaces?Boolean

Whether to remove namespaces in xpath assertion automatically

Returns:

  • (Boolean)


77
78
79
# File 'lib/soaspec.rb', line 77

def strip_namespaces?
  @strip_namespaces || false
end