Sha256: e616887a30ea8479b2ef670822c3e996d0b2453cb29ecb21a468d6f33f9c0973

Contents?: true

Size: 479 Bytes

Versions: 13

Compression:

Stored size: 479 Bytes

Contents

module HTTParty
  class Request
    def perform_actual_request
      response = http.request(@raw_request)
      if !defined?(DONT_SAVE) && !FakeWeb.registered_uri?(:post, uri)
        File.open(File.dirname(__FILE__) + "/../responses/_new.xml", 'w') {|f| f.write(response.body) }
        raise FakeWeb::NetConnectNotAllowedError.new("You have not registered this response, the response has been put in responses/_new.xml")
      else
        response
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
binarylogic-shippinglogic-1.0.0 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.0.1 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.0.2 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.0.3 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.0.4 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.0.5 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.0.6 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.0.7 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.0.8 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.1.0 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.1.1 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.1.2 spec/lib/interceptor.rb
binarylogic-shippinglogic-1.1.3 spec/lib/interceptor.rb