Sha256: 1616595bb3ad938836eeba5fc246304f5e924b54f8a61ba906639fea960a8bde

Contents?: true

Size: 683 Bytes

Versions: 1

Compression:

Stored size: 683 Bytes

Contents

require_relative '../../lib/git_helper/gitlab_client.rb'

describe GitHelper::GitLabClient do
  let(:git_config_reader) { double(:git_config_reader, gitlab_token: :token) }

  subject { GitHelper::GitLabClient.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(Gitlab).to receive(:client)
      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/gitlab_client_spec.rb