Sha256: 4701092c724cb12fc1a11244a45ea7934ce9ea9c9b869a38784194d5cf393eab

Contents?: true

Size: 428 Bytes

Versions: 7

Compression:

Stored size: 428 Bytes

Contents

module UniversalGitClient
  module Http
    module Helpers
      class DummyResponse
        def self.response(request: nil, response: nil, body: {}, options: {})
          request ||= HTTParty::Request.new(Net::HTTP::Get, '/', options)
          response ||= Net::HTTPSuccess.new('1.1', 200, 'Success')

          HTTParty::Response.new(request, response, -> { '' }, body: body.to_json)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
universal-git-client-2.2.0 lib/universal-git-client/http/helpers/dummy_response.rb
universal-git-client-2.1.0 lib/universal-git-client/http/helpers/dummy_response.rb
universal-git-client-2.0.0 lib/universal-git-client/http/helpers/dummy_response.rb
universal-git-client-1.2.12 lib/universal-git-client/http/helpers/dummy_response.rb
universal-git-client-1.2.10 lib/universal-git-client/http/helpers/dummy_response.rb
universal-git-client-1.2.9 lib/universal-git-client/http/helpers/dummy_response.rb
universal-git-client-1.2.4 lib/universal-git-client/http/helpers/dummy_response.rb