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
33 lines (22 loc) · 671 Bytes
/
Copy pathset_spec.rb
File metadata and controls
33 lines (22 loc) · 671 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
33
# -*- 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
subject.user.should == 'user-name'
end
it 'sets repo' do
subject.repo.should == '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