Sha256: 474447653a3ecd7c975729414606b87febd022fa27de5884502ef47645db73f7

Contents?: true

Size: 804 Bytes

Versions: 7

Compression:

Stored size: 804 Bytes

Contents

require 'rubygems'
require 'vcr'
require 'equivalent-xml'
require 'nne_client'

HTTPI.log = false

Savon.configure do |config|
  config.log = false            # disable logging
  config.log_level = :info      # changing the log level
  # config.logger = Rails.logger  # using the Rails logger
end


VCR.configure do |c|
  c.cassette_library_dir = 'spec/vcr_cassettes'
  c.hook_into :fakeweb
  c.register_request_matcher :soap_body_matcher do |request_1, request_2|
    node_1 = Nokogiri::XML(request_1.body)
    node_2 = Nokogiri::XML(request_2.body)
    EquivalentXml.equivalent?(node_1, node_2, opts = { :element_order => true, :normalize_whitespace => false })
  end
end

def soap_vcr(cassette_name)
  VCR.use_cassette(cassette_name, :match_requests_on => [:soap_body_matcher]) do
    yield
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nne_client-0.0.7 spec/spec_helper.rb
nne_client-0.0.6 spec/spec_helper.rb
nne_client-0.0.5 spec/spec_helper.rb
nne_client-0.0.4 spec/spec_helper.rb
nne_client-0.0.3 spec/spec_helper.rb
nne_client-0.0.2 spec/spec_helper.rb
nne_client-0.0.1 spec/spec_helper.rb