File tree Expand file tree Collapse file tree
spec/github/client/activity/notifications Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131
3232 it 'should create resource' do
3333 subject . create thread_id , inputs
34- a_put ( request_path ) .
35- with ( :body => inputs , :query => { :access_token => OAUTH_TOKEN } ) .
36- should have_been_made
34+ expect ( a_put ( request_path ) .
35+ with ( :body => inputs , :query => { :access_token => OAUTH_TOKEN } ) ) .
36+ to have_been_made
3737 end
3838
3939 it 'should return the resource' do
4040 thread = subject . create thread_id , inputs
41- thread . subscribed . should be_true
41+ expect ( thread . subscribed ) . to be_true
4242 end
4343 end
4444end # create
Original file line number Diff line number Diff line change 2121
2222 it "should delete the resource successfully" do
2323 subject . delete thread_id
24- a_delete ( request_path ) . with ( :query => { :access_token => OAUTH_TOKEN } ) .
25- should have_been_made
24+ expect ( a_delete ( request_path ) . with ( :query => { :access_token => OAUTH_TOKEN } ) ) .
25+ to have_been_made
2626 end
2727
2828 it "should fail to delete resource without 'user' parameter" do
Original file line number Diff line number Diff line change 2525
2626 it "should find resources" do
2727 subject . get thread_id
28- a_get ( request_path ) . should have_been_made
28+ expect ( a_get ( request_path ) ) . to have_been_made
2929 end
3030
3131 it "should return repository mash" do
3232 threads = subject . get thread_id
33- threads . should be_an Enumerable
34- threads . should have ( 1 ) . items
33+ expect ( threads ) . to be_an Enumerable
34+ expect ( threads . size ) . to eq ( 1 )
3535 end
3636
3737 it "should get repository information" do
3838 threads = subject . get thread_id
39- threads . first . repository . name . should == 'Hello-World'
39+ expect ( threads . first . repository . name ) . to eq ( 'Hello-World' )
4040 end
4141
4242 it "should yield repositories to a block" do
43- subject . should_receive ( :get ) . and_yield ( 'octocat' )
43+ expect ( subject ) . to receive ( :get ) . and_yield ( 'octocat' )
4444 subject . get ( thread_id ) { |repo | 'octocat' }
4545 end
4646 end
Original file line number Diff line number Diff line change 2525
2626 it 'should get the resource' do
2727 subject . list
28- a_get ( request_path ) . with ( :query => { :access_token => OAUTH_TOKEN } ) .
29- should have_been_made
28+ expect ( a_get ( request_path ) . with ( :query => { :access_token => OAUTH_TOKEN } ) ) .
29+ to have_been_made
3030 end
3131
3232 it_should_behave_like 'an array of resources' do
3535
3636 it "should get resource information" do
3737 notifications = subject . list
38- notifications . first . repository . name . should == 'Hello-World'
38+ expect ( notifications . first . repository . name ) . to eq ( 'Hello-World' )
3939 end
4040
4141 it "should yield repositories to a block" do
42- subject . should_receive ( :list ) . and_yield ( 'octocat' )
42+ expect ( subject ) . to receive ( :list ) . and_yield ( 'octocat' )
4343 subject . list { |repo | 'octocat' }
4444 end
4545
6161
6262 it "should get the resource" do
6363 subject . list :user => user , :repo => repo
64- a_get ( request_path ) . with ( :query => { :access_token => OAUTH_TOKEN } ) .
65- should have_been_made
64+ expect ( a_get ( request_path ) . with ( :query => { :access_token => OAUTH_TOKEN } ) ) .
65+ to have_been_made
6666 end
6767 end
6868
Original file line number Diff line number Diff line change 2727
2828 it 'should get the resource' do
2929 subject . mark ( inputs )
30- a_put ( request_path ) .
31- with ( :body => inputs , :query => { :access_token => OAUTH_TOKEN } ) .
32- should have_been_made
30+ expect ( a_put ( request_path ) .
31+ with ( :body => inputs , :query => { :access_token => OAUTH_TOKEN } ) ) .
32+ to have_been_made
3333 end
3434 end
3535
4747
4848 it 'should get the resource' do
4949 subject . mark inputs . merge ( :user => user , :repo => repo )
50- a_put ( request_path ) .
51- with ( :body => inputs , :query => { :access_token => OAUTH_TOKEN } ) .
52- should have_been_made
50+ expect ( a_put ( request_path ) .
51+ with ( :body => inputs , :query => { :access_token => OAUTH_TOKEN } ) ) .
52+ to have_been_made
5353 end
5454 end
5555
6666
6767 it 'should get the resource' do
6868 subject . mark inputs . merge ( :id => thread_id )
69- a_patch ( request_path ) .
70- with ( :body => inputs , :query => { :access_token => OAUTH_TOKEN } ) .
71- should have_been_made
69+ expect ( a_patch ( request_path ) .
70+ with ( :body => inputs , :query => { :access_token => OAUTH_TOKEN } ) ) .
71+ to have_been_made
7272 end
7373 end
7474end # mark
Original file line number Diff line number Diff line change 2525
2626 it 'gets the resource' do
2727 subject . subscribed? thread_id
28- a_get ( request_path ) . with ( :query => { :access_token => OAUTH_TOKEN } ) .
29- should have_been_made
28+ expect ( a_get ( request_path ) . with ( :query => { :access_token => OAUTH_TOKEN } ) ) .
29+ to have_been_made
3030 end
3131
3232 it 'gets resource information' do
3333 subscribed = subject . subscribed? thread_id
34- subscribed . subscribed . should be_true
34+ expect ( subscribed . subscribed ) . to be_true
3535 end
3636 end
3737
You can’t perform that action at this time.
0 commit comments