forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathset_spec.rb
More file actions
32 lines (22 loc) · 668 Bytes
/
set_spec.rb
File metadata and controls
32 lines (22 loc) · 668 Bytes
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
# encoding: utf-8
require 'spec_helper'
describe Github::API, '#set' do
after { reset_authentication_for subject }
it 'requires value to be set' do
expect { subject.set :option }.to raise_error(ArgumentError)
end
context 'accpets more than one option' do
before { subject.set user: 'user-name', repo: 'repo-name' }
it 'sets user' do
expect(subject.user).to eql('user-name')
end
it 'sets repo' do
expect(subject.repo).to eql('repo-name')
end
end
context 'defines accessors' do
before { subject.set :branch, 'arguments' }
it { should respond_to :branch }
it { should respond_to 'branch=' }
end
end