Sha256: 3d6c73b64212fa2f96e1d4639f0e0d380f34e5d4e16175bb43cb85fe9ae310ac

Contents?: true

Size: 1.61 KB

Versions: 1

Compression:

Stored size: 1.61 KB

Contents

require 'rest-client' # REST
require 'erb' # Embedded ruby
require 'yaml' # Reading yaml
require 'rspec' # Testing framework
require 'rspec/its'
require 'savon' # SOAP
require 'nokogiri' # XPath
require 'date'

require 'soaspec/version'
require 'soaspec/basic_soap_handler'
require 'soaspec/tester'
require 'soaspec/exchange'
require 'soaspec/matchers'
require 'soaspec/soaspec_shared_examples'
require 'soaspec/hash_methods'
require 'soaspec/spec_logger'
require 'soaspec/exe_helpers'
require 'soaspec/rest_handler'


# Gem for handling SOAP and REST api tests
module Soaspec

  def self.hi
    puts 'Hello world!'
  end

  # Represents Environment parameters used in Soaspec tests
  module Environment

    # Used so that exchange class knows what context it's in
    def self.api_handler=(handler)
      @api_handler = handler
    end

    def self.api_handler
      @api_handler
    end

    # Whether to transform strings to keys automatically
    def self.always_use_keys=(use_keys)
      @always_use_keys = use_keys
    end

    def self.always_use_keys?
      @always_use_keys || true
    end

    # Whether to remove namespaces from response in Xpath assertion automatically
    # For why this may not be a good thing in general see
    # http://tenderlovemaking.com/2009/04/23/namespaces-in-xml.html
    # This will be overridden if xpath has a ':' in it
    def self.strip_namespaces=(remove_namespaces_from_response)
      @strip_namespaces = remove_namespaces_from_response
    end

    # Whether to remove namespaces in xpath assertion automatically
    def self.strip_namespaces?
      @strip_namespaces || false
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
soaspec-0.0.24 lib/soaspec.rb