forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfiguration_spec.rb
More file actions
59 lines (37 loc) · 1.32 KB
/
Copy pathconfiguration_spec.rb
File metadata and controls
59 lines (37 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# encoding: utf-8
require 'spec_helper'
describe Github::Configuration do
let(:klass) {
::Class.new do
extend Github::Configuration
end
}
subject { klass }
its(:adapter) { should == described_class::DEFAULT_ADAPTER }
its(:endpoint) { should == described_class::DEFAULT_ENDPOINT }
its(:site) { should == described_class::DEFAULT_SITE }
its(:user_agent) { should == described_class::DEFAULT_USER_AGENT }
its(:oauth_token) { should be_nil }
its(:auto_pagination) { should == described_class::DEFAULT_AUTO_PAGINATION }
its(:auto_pagination) { should be_false }
its(:ssl) { should == described_class::DEFAULT_SSL }
its(:ssl) { should be_a Hash }
its(:user_agent) { should == described_class::DEFAULT_USER_AGENT }
its(:repo) { should be_nil }
its(:user) { should be_nil }
its(:connection_options) { should be_a Hash }
its(:connection_options) { should be_empty }
its(:login) { should == described_class::DEFAULT_LOGIN }
its(:password) { should == described_class::DEFAULT_PASSWORD }
describe ".configure" do
it { should respond_to :configure }
described_class.keys.each do |key|
it "should set the #{key}" do
subject.configure do |config|
config.send("#{key}=", key)
subject.send(key).should == key
end
end
end
end
end