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.6.2.travis.371.4 spec/support/fake_github.rb
travis-1.6.2 spec/support/fake_github.rb
travis-1.6.2.travis.370.4 spec/support/fake_github.rb
travis-1.6.2.travis.369.4 spec/support/fake_github.rb
travis-1.6.2.travis.368.4 spec/support/fake_github.rb
travis-1.6.2.travis.367.4 spec/support/fake_github.rb
travis-1.6.2.travis.366.4 spec/support/fake_github.rb
travis-1.6.2.travis.365.4 spec/support/fake_github.rb
travis-1.6.2.travis.364.4 spec/support/fake_github.rb
travis-1.6.1 spec/support/fake_github.rb
travis-1.6.1.travis.363.4 spec/support/fake_github.rb
travis-1.6.0 spec/support/fake_github.rb
travis-1.5.9.travis.362.4 spec/support/fake_github.rb
travis-1.5.9.travis.361.4 spec/support/fake_github.rb
travis-1.5.9.travis.360.4 spec/support/fake_github.rb
travis-1.5.9.travis.358.4 spec/support/fake_github.rb
travis-1.5.8 spec/support/fake_github.rb
travis-1.5.8.travis.356.4 spec/support/fake_github.rb
travis-1.5.7 spec/support/fake_github.rb
travis-1.5.7.travis.345.4 spec/support/fake_github.rb