Sha256: e7bde87b1a9bf6f3039ddb964a230a90d5a8d2bce6affc656b3d8412bc656786

Contents?: true

Size: 692 Bytes

Versions: 1

Compression:

Stored size: 692 Bytes

Contents

require_relative '../../lib/git_helper/octokit_client.rb'

describe GitHelper::OctokitClient do
  let(:git_config_reader) { double(:git_config_reader, github_token: :token) }

  subject { GitHelper::OctokitClient.new }

  before do
    allow(GitHelper::GitConfigReader).to receive(:new).and_return(git_config_reader)
  end

  describe '#client' do
    it 'should call the GitLab client to make a new client' do
      expect(Octokit::Client).to receive(:new)
      subject.client
    end
  end

  describe '#git_config_reader' do
    it 'should make a new git config reader' do
      expect(GitHelper::GitConfigReader).to receive(:new)
      subject.send(:git_config_reader)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
git_helper-2.0.0 spec/git_helper/octokit_client_spec.rb