Sha256: e545a13829afbc32d6b6d0b27e7a5328abdfbab1c728d1358f6c7c2cf252714a

Contents?: true

Size: 459 Bytes

Versions: 84

Compression:

Stored size: 459 Bytes

Contents

require 'gh'

module GH
  class FakeRemote < Remote
    def setup(host, options)
      @authenticated = options[:password] == 'password'
      super
    end

    def post(key, body)
      raise GH::Error unless @authenticated and 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

84 entries across 84 versions & 1 rubygems

Version Path
travis-1.2.3 spec/support/fake_github.rb
travis-1.2.2 spec/support/fake_github.rb
travis-1.2.1 spec/support/fake_github.rb
travis-1.2.0 spec/support/fake_github.rb