File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
spec/bitbucket_rest_api/repos Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change 1010 '/1.0/repositories/mock_username/mock_repo/followers/' ,
1111 { } ,
1212 { }
13- )
13+ ) . and_return ( [ 'follower1' , 'follower2' , 'follower3' ] )
1414 end
1515
16- it 'should send a GET request for the followers belonging to the given repo' do
17- following . followers ( 'mock_username' , 'mock_repo' )
16+ context 'without a block' do
17+ it 'should send a GET request for the followers belonging to the given repo' do
18+ following . followers ( 'mock_username' , 'mock_repo' )
19+ end
20+ end
21+
22+ context 'with a block' do
23+ it 'should send a GET request for the followers belonging to the given repo' do
24+ following . followers ( 'mock_username' , 'mock_repo' ) { |follower | follower }
25+ end
1826 end
1927 end
2028
2634 '/1.0/user/follows' ,
2735 { } ,
2836 { }
29- )
37+ ) . and_return ( [ 'followed1' , 'followed2' , 'followed3' ] )
38+ end
39+
40+ context 'without a block' do
41+ it 'should send a GET request for the followers belonging to a particular user' do
42+ following . followed
43+ end
3044 end
3145
32- it 'should send a GET request for the followers belonging to a particular user' do
33- following . followed
46+ context 'with a block' do
47+ it 'should send a GET request for the followers belonging to a particular user' do
48+ following . followed { |followed | followed }
49+ end
3450 end
3551 end
3652end
You can’t perform that action at this time.
0 commit comments