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.4.travis.410.4 spec/support/fake_github.rb
travis-1.6.4.travis.406.4 spec/support/fake_github.rb
travis-1.6.4.travis.405.4 spec/support/fake_github.rb
travis-1.6.4.travis.395.4 spec/support/fake_github.rb
travis-1.6.3 spec/support/fake_github.rb
travis-1.6.3.travis.394.4 spec/support/fake_github.rb
travis-1.6.3.travis.392.4 spec/support/fake_github.rb
travis-1.6.3.travis.390.4 spec/support/fake_github.rb
travis-1.6.3.travis.389.4 spec/support/fake_github.rb
travis-1.6.3.travis.388.4 spec/support/fake_github.rb
travis-1.6.3.travis.387.4 spec/support/fake_github.rb
travis-1.6.3.travis.386.4 spec/support/fake_github.rb
travis-1.6.3.travis.385.4 spec/support/fake_github.rb
travis-1.6.3.travis.384.4 spec/support/fake_github.rb
travis-1.6.3.travis.381.4 spec/support/fake_github.rb
travis-1.6.3.travis.379.4 spec/support/fake_github.rb
travis-1.6.3.travis.377.4 spec/support/fake_github.rb
travis-1.6.3.travis.376.4 spec/support/fake_github.rb
travis-1.6.3.travis.374.4 spec/support/fake_github.rb
travis-1.6.3.travis.373.4 spec/support/fake_github.rb