Sha256: 260004e2ae48b15d5d15aa3dd0972a2bc33283dbfb7c7cbc4fb7fe932ed690bb

Contents?: true

Size: 516 Bytes

Versions: 317

Compression:

Stored size: 516 Bytes

Contents

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 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

317 entries across 317 versions & 3 rubygems

Version Path
travis-1.8.10.travis.943.11 spec/support/fake_github.rb
travis-1.8.10.travis.942.11 spec/support/fake_github.rb
travis-1.8.10.travis.941.11 spec/support/fake_github.rb
travis-1.8.10.travis.940.11 spec/support/fake_github.rb
travis-1.8.10.travis.935.11 spec/support/fake_github.rb
travis-1.8.10.travis.933.11 spec/support/fake_github.rb
travis-1.8.10.travis.931.11 spec/support/fake_github.rb
travis-1.8.10.travis.930.11 spec/support/fake_github.rb
travis-1.8.10.travis.929.11 spec/support/fake_github.rb
travis-1.8.10.travis.927.11 spec/support/fake_github.rb
travis-1.8.10.travis.925.11 spec/support/fake_github.rb
travis-1.8.10.travis.924.11 spec/support/fake_github.rb
travis-1.8.10.travis.923.11 spec/support/fake_github.rb
travis-1.8.10.travis.922.11 spec/support/fake_github.rb
travis-1.8.10.travis.921.11 spec/support/fake_github.rb
travis-1.8.9 spec/support/fake_github.rb
travis-1.8.9.travis.919.11 spec/support/fake_github.rb
travis-1.8.9.travis.918.11 spec/support/fake_github.rb
travis-1.8.9.travis.916.11 spec/support/fake_github.rb
travis-1.8.9.travis.875.3 spec/support/fake_github.rb