Skip to content

Commit 76e0ce8

Browse files
committed
Update specs for paged requests.
1 parent 3d9967e commit 76e0ce8

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

spec/github/page_iterator_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# encoding: utf-8
2+
13
require 'spec_helper'
24

35
describe Github::PageIterator do
4-
56
let(:link) {
67
"<https://api.github.com/users/wycats/repos?page=4&per_page=20>; rel=\"next\", <https://api.github.com/users/wycats/repos?page=6&per_page=20>; rel=\"last\", <https://api.github.com/users/wycats/repos?page=1&per_page=20>; rel=\"first\", <https://api.github.com/users/wycats/repos?page=2&per_page=20>; rel=\"prev\""
78
}

spec/github/page_links_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# encoding: utf-8
2+
13
require 'spec_helper'
24

35
describe Github::PageLinks do
4-
56
let(:link) {
67
"<https://api.github.com/users/wycats/repos?page=4&per_page=20>; rel=\"next\", <https://api.github.com/users/wycats/repos?page=6&per_page=20>; rel=\"last\", <https://api.github.com/users/wycats/repos?page=1&per_page=20>; rel=\"first\", <https://api.github.com/users/wycats/repos?page=2&per_page=20>; rel=\"prev\""
78
}

spec/github/paged_request_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# encoding: utf-8
2+
13
require 'spec_helper'
24

35
describe Github::PagedRequest do
4-
56
it { described_class.constants.should include :FIRST_PAGE }
67
it { described_class.constants.should include :PER_PAGE }
78

spec/github/repos_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
# encoding: utf-8
2+
13
require 'spec_helper'
24

35
describe Github::Repos do
46
let(:github) { Github.new }
57
let(:user) { 'peter-murach' }
68
let(:repo) { 'github' }
79

8-
after { github.user, github.repo = nil, nil }
10+
after { reset_authentication_for github }
911

1012
describe "branches" do
1113
context "resource found" do

0 commit comments

Comments
 (0)