Skip to content

Commit 3ca60ca

Browse files
committed
Update activity specs.
1 parent 4713783 commit 3ca60ca

14 files changed

Lines changed: 27 additions & 30 deletions

File tree

lib/github_api/client/activity/feeds.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module Github
44
class Client::Activity::Feeds < API
5-
65
# List all the feeds available to the authenticated user.
76
#
87
# @see https://developer.github.com/v3/activity/feeds/#list-feeds

lib/github_api/client/activity/notifications.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module Github
44
class Client::Activity::Notifications < API
5-
65
# List your notifications
76
#
87
# List all notifications for the current user, grouped by repository.

spec/github/client/activity/feeds/list_spec.rb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe Github::Client::Activity::Feeds, '#list' do
5+
RSpec.describe Github::Client::Activity::Feeds, '#list' do
66
let(:user) { 'peter-murach' }
77
let(:repo) { 'github' }
88

@@ -23,43 +23,43 @@
2323

2424
it { should respond_to :all }
2525

26-
it 'should get the resource' do
26+
it 'gets the resource' do
2727
subject.list
2828
expect(a_get(request_path).with(:query => {:access_token => OAUTH_TOKEN})).
2929
to have_been_made
3030
end
3131

32-
it "should get timeline url" do
32+
it "gets timeline url" do
3333
feeds = subject.list
3434
expect(feeds.timeline_url).to eq('https://github.com/timeline')
3535
end
3636

37-
it "should get user url" do
37+
it "gest user url" do
3838
feeds = subject.list
3939
expect(feeds.user_url).to eq('https://github.com/{user}')
4040
end
4141

42-
it "should get current user public url" do
42+
it "gets current user public url" do
4343
feeds = subject.list
4444
expect(feeds.current_user_public_url).to eq('https://github.com/defunkt')
4545
end
4646

47-
it "should get current user url" do
47+
it "gets current user url" do
4848
feeds = subject.list
4949
expect(feeds.current_user_url).to eq('https://github.com/defunkt.private?token=abc123')
5050
end
5151

52-
it "should get current user actor url" do
52+
it "gets current user actor url" do
5353
feeds = subject.list
5454
expect(feeds.current_user_actor_url).to eq('https://github.com/defunkt.private.actor?token=abc123')
5555
end
5656

57-
it "should get current user organization url" do
57+
it "gets current user organization url" do
5858
feeds = subject.list
5959
expect(feeds.current_user_organization_url).to eq('')
6060
end
6161

62-
it "should get current user public url" do
62+
it "gets current user public url" do
6363
feeds = subject.list
6464
expect(feeds.current_user_organization_urls.first).to eq('https://github.com/organizations/github/defunkt.private.atom?token=abc123')
6565
end
@@ -68,5 +68,4 @@
6868
let(:requestable) { subject.list }
6969
end
7070
end
71-
7271
end

spec/github/client/activity/notifications/create_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe Github::Client::Activity::Notifications, '#create' do
5+
RSpec.describe Github::Client::Activity::Notifications, '#create' do
66
let(:thread_id) { 1 }
77
let(:request_path) { "/notifications/threads/#{thread_id}/subscription" }
88

@@ -29,14 +29,14 @@
2929
expect { subject.create }.to raise_error(ArgumentError)
3030
end
3131

32-
it 'should create resource' do
32+
it 'creates resource' do
3333
subject.create thread_id, inputs
3434
expect(a_put(request_path).
3535
with(:body => inputs, :query => {:access_token => OAUTH_TOKEN})).
3636
to have_been_made
3737
end
3838

39-
it 'should return the resource' do
39+
it 'returns the resource' do
4040
thread = subject.create thread_id, inputs
4141
expect(thread.subscribed).to be_true
4242
end

spec/github/client/activity/notifications/delete_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe Github::Client::Activity::Notifications, '#delete' do
5+
RSpec.describe Github::Client::Activity::Notifications, '#delete' do
66
let(:thread_id) { 1 }
77
let(:request_path) { "/notifications/threads/#{thread_id}/subscription" }
88
let(:body) { '' }

spec/github/client/activity/notifications/get_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe Github::Client::Activity::Notifications, '#get' do
5+
RSpec.describe Github::Client::Activity::Notifications, '#get' do
66
let(:thread_id) { 1 }
77
let(:request_path) { "/notifications/threads/#{thread_id}" }
88

spec/github/client/activity/notifications/list_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe Github::Client::Activity::Notifications, '#list' do
5+
RSpec.describe Github::Client::Activity::Notifications, '#list' do
66
let(:user) { 'peter-murach' }
77
let(:repo) { 'github' }
88

spec/github/client/activity/notifications/mark_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe Github::Client::Activity::Notifications, '#mark' do
5+
RSpec.describe Github::Client::Activity::Notifications, '#mark' do
66
let(:body) { '[]' }
77
let(:status) { 205 }
88
let(:inputs) { {

spec/github/client/activity/notifications/subscribed_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe Github::Client::Activity::Notifications, '#subscribed?' do
5+
RSpec.describe Github::Client::Activity::Notifications, '#subscribed?' do
66
let(:thread_id) { 1 }
77
let(:request_path) { "/notifications/threads/#{thread_id}/subscription" }
88

spec/github/client/activity/starring/list_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe Github::Client::Activity::Starring, '#list' do
5+
RSpec.describe Github::Client::Activity::Starring, '#list' do
66
let(:user) { 'peter-murach' }
77
let(:repo) { 'github' }
88
let(:request_path) { "/repos/#{user}/#{repo}/stargazers" }
@@ -11,7 +11,7 @@
1111

1212
before {
1313
stub_get(request_path).
14-
to_return(:body => body, :status => status, :headers => {})
14+
to_return(body: body, status: status, headers: {})
1515
}
1616

1717
context 'resource found' do
@@ -22,17 +22,17 @@
2222

2323
it { expect { subject.list user }.to raise_error(ArgumentError) }
2424

25-
it "should fail to get resource without username" do
25+
it "fails to get resource without username" do
2626
expect { subject.list }.to raise_error(ArgumentError)
2727
end
2828

29-
it "should yield iterator if block given" do
29+
it "yields iterator if block given" do
3030
yielded = []
3131
result = subject.list(user, repo) { |obj| yielded << obj }
3232
expect(yielded).to eq(result)
3333
end
3434

35-
it "should get the resources" do
35+
it "gets the resources" do
3636
subject.list user, repo
3737
expect(a_get(request_path)).to have_been_made
3838
end
@@ -41,7 +41,7 @@
4141
let(:requestable) { subject.list user, repo }
4242
end
4343

44-
it "should get watcher information" do
44+
it "gets watcher information" do
4545
stargazers = subject.list user, repo
4646
expect(stargazers.first.login).to eq('octocat')
4747
end

0 commit comments

Comments
 (0)