Sha256: f7a85b7b7732aea978cd272772790b76cd25e212819831741e797aed5973a07d
Contents?: true
Size: 550 Bytes
Versions: 6
Compression:
Stored size: 550 Bytes
Contents
# frozen_string_literal: true require 'gh' module GH class FakeRemote < Remote def setup(host, options) @authenticated = options[:password] == 'password' super end def http(*) raise NotImplementedError end def post(key, _body) raise GH::Error unless @authenticated && (key == '/authorizations') frontend.load('url' => 'https://api.github.com/authorizations/1', 'token' => 'github_token') end def head(*) end def delete(*) end end DefaultStack.replace(Remote, FakeRemote) end
Version data entries
6 entries across 6 versions & 1 rubygems