Sha256: 3ff4efc7b65bd3e64eb3e71135dce4083d5c7448b56eef839f966cf48b649a74

Contents?: true

Size: 726 Bytes

Versions: 3

Compression:

Stored size: 726 Bytes

Contents

class ResponseFixture
  class << self

    def authentication(value = nil)
      @authentication ||= load_fixture :authentication
      
      case value
        when :to_hash then Savon::SOAP::XML.to_hash(@authentication)[:authenticate_response][:return]
        else               @authentication
      end
    end

    def soap_fault
      @soap_fault ||= load_fixture :soap_fault
    end

    def soap_fault12
      @soap_fault12 ||= load_fixture :soap_fault12
    end

    def multi_ref
      @multi_ref ||= load_fixture :multi_ref
    end

    def list
      @list ||= load_fixture :list
    end

  private

    def load_fixture(fixture)
      File.read File.dirname(__FILE__) + "/xml/#{fixture}.xml"
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
savon-0.8.0.beta.3 spec/fixtures/response/response_fixture.rb
savon-0.8.0.beta.2 spec/fixtures/response/response_fixture.rb
savon-0.8.0.beta.1 spec/fixtures/response/response_fixture.rb