Sha256: b552351b74e6bdc003a51484ec7774fc1ade4d9660cf908230b73e28fae63b01
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
# encoding: utf-8 require 'spec_helper' describe GithubCLI::API, '#configure' do let(:object) { described_class } before { GithubCLI.stub(:config).and_return(config) } subject { object.configure } context 'with default' do let(:config) { { } } its(:adapter) { should eql(:net_http) } its(:ssl) { should eql({}) } its(:site) { should eql('https://github.com') } its(:endpoint) { should eql('https://api.github.com') } its(:oauth_token) { should be_nil } end context 'with config values' do let(:config) { { 'core.ssl' => {"verify" => false}, 'core.adapter' => :patron, 'core.site' => 'http://site.com', 'core.endpoint' => 'http://api.com', 'user.token' => 'abc1234' } } its(:adapter) { should eql(:patron) } its(:ssl) { should eql({"verify" => false})} its(:site) { should eql('http://site.com')} its(:endpoint) { should eql('http://api.com') } its(:oauth_token) { should eql('abc1234') } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
github_cli-0.6.2 | spec/github_cli/api/configure_spec.rb |
github_cli-0.6.1 | spec/github_cli/api/configure_spec.rb |
github_cli-0.6.0 | spec/github_cli/api/configure_spec.rb |