github_api 0.8.11 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. data/README.md +21 -14
  2. data/features/activity/notifications.feature +15 -0
  3. data/features/cassettes/activity/notifications/list_user.yml +54 -0
  4. data/features/step_definitions/common_steps.rb +8 -9
  5. data/lib/github_api.rb +3 -4
  6. data/lib/github_api/activity.rb +8 -13
  7. data/lib/github_api/activity/events.rb +0 -5
  8. data/lib/github_api/activity/notifications.rb +0 -5
  9. data/lib/github_api/api.rb +27 -22
  10. data/lib/github_api/api_factory.rb +13 -12
  11. data/lib/github_api/authorizations.rb +0 -5
  12. data/lib/github_api/client.rb +33 -33
  13. data/lib/github_api/configuration.rb +10 -2
  14. data/lib/github_api/connection.rb +2 -3
  15. data/lib/github_api/constants.rb +0 -3
  16. data/lib/github_api/gists.rb +2 -7
  17. data/lib/github_api/git_data.rb +10 -15
  18. data/lib/github_api/git_data/blobs.rb +0 -5
  19. data/lib/github_api/git_data/commits.rb +0 -5
  20. data/lib/github_api/git_data/references.rb +3 -7
  21. data/lib/github_api/git_data/tags.rb +0 -5
  22. data/lib/github_api/git_data/trees.rb +0 -5
  23. data/lib/github_api/gitignore.rb +0 -5
  24. data/lib/github_api/issues.rb +10 -15
  25. data/lib/github_api/issues/comments.rb +0 -5
  26. data/lib/github_api/issues/events.rb +0 -5
  27. data/lib/github_api/issues/labels.rb +0 -5
  28. data/lib/github_api/issues/milestones.rb +0 -5
  29. data/lib/github_api/markdown.rb +0 -5
  30. data/lib/github_api/meta.rb +0 -5
  31. data/lib/github_api/orgs.rb +4 -9
  32. data/lib/github_api/page_iterator.rb +44 -29
  33. data/lib/github_api/paged_request.rb +12 -12
  34. data/lib/github_api/{result.rb → pagination.rb} +19 -86
  35. data/lib/github_api/params_hash.rb +1 -1
  36. data/lib/github_api/pull_requests.rb +2 -7
  37. data/lib/github_api/repos.rb +22 -27
  38. data/lib/github_api/request.rb +7 -4
  39. data/lib/github_api/response/header.rb +76 -0
  40. data/lib/github_api/response_wrapper.rb +126 -0
  41. data/lib/github_api/scopes.rb +1 -1
  42. data/lib/github_api/search.rb +0 -5
  43. data/lib/github_api/users.rb +6 -11
  44. data/lib/github_api/version.rb +2 -2
  45. data/spec/github/activity/notifications/get_spec.rb +1 -1
  46. data/spec/github/activity/starring/starred_spec.rb +1 -1
  47. data/spec/github/activity/watching/watched_spec.rb +1 -1
  48. data/spec/github/api_factory_spec.rb +7 -8
  49. data/spec/github/api_spec.rb +0 -7
  50. data/spec/github/authorization_spec.rb +22 -32
  51. data/spec/github/authorizations/create_spec.rb +49 -0
  52. data/spec/github/authorizations/delete_spec.rb +39 -0
  53. data/spec/github/authorizations/get_spec.rb +49 -0
  54. data/spec/github/authorizations/list_spec.rb +55 -0
  55. data/spec/github/authorizations/update_spec.rb +50 -0
  56. data/spec/github/authorizations_spec.rb +2 -236
  57. data/spec/github/gists/comments/create_spec.rb +1 -1
  58. data/spec/github/gists/comments/edit_spec.rb +1 -1
  59. data/spec/github/gists/comments/get_spec.rb +1 -1
  60. data/spec/github/gists/create_spec.rb +1 -1
  61. data/spec/github/gists/edit_spec.rb +1 -1
  62. data/spec/github/gists/fork_spec.rb +1 -1
  63. data/spec/github/gists/get_spec.rb +1 -1
  64. data/spec/github/git_data/blobs/create_spec.rb +1 -1
  65. data/spec/github/git_data/blobs/get_spec.rb +1 -1
  66. data/spec/github/git_data/commits/create_spec.rb +1 -1
  67. data/spec/github/git_data/commits/get_spec.rb +1 -1
  68. data/spec/github/git_data/references/create_spec.rb +2 -2
  69. data/spec/github/git_data/references/get_spec.rb +1 -1
  70. data/spec/github/git_data/references/list_spec.rb +16 -6
  71. data/spec/github/git_data/tags/create_spec.rb +1 -1
  72. data/spec/github/git_data/tags/get_spec.rb +1 -1
  73. data/spec/github/git_data/trees/create_spec.rb +1 -1
  74. data/spec/github/git_data/trees/get_spec.rb +4 -4
  75. data/spec/github/issues/comments/create_spec.rb +1 -1
  76. data/spec/github/issues/comments/edit_spec.rb +1 -1
  77. data/spec/github/issues/comments/get_spec.rb +1 -1
  78. data/spec/github/issues/create_spec.rb +1 -1
  79. data/spec/github/issues/edit_spec.rb +1 -1
  80. data/spec/github/issues/events/get_spec.rb +1 -1
  81. data/spec/github/issues/get_spec.rb +1 -1
  82. data/spec/github/issues/labels/create_spec.rb +1 -1
  83. data/spec/github/issues/labels/get_spec.rb +1 -1
  84. data/spec/github/issues/labels/update_spec.rb +1 -1
  85. data/spec/github/issues/milestones/create_spec.rb +1 -1
  86. data/spec/github/issues/milestones/delete_spec.rb +1 -1
  87. data/spec/github/issues/milestones/get_spec.rb +1 -1
  88. data/spec/github/issues/milestones/update_spec.rb +1 -1
  89. data/spec/github/orgs/edit_spec.rb +1 -1
  90. data/spec/github/orgs/get_spec.rb +1 -1
  91. data/spec/github/orgs/teams/create_spec.rb +1 -1
  92. data/spec/github/orgs/teams/edit_spec.rb +1 -1
  93. data/spec/github/orgs/teams/get_spec.rb +1 -1
  94. data/spec/github/paged_request_spec.rb +34 -29
  95. data/spec/github/pagination/iterator/number_spec.rb +118 -0
  96. data/spec/github/pagination/iterator/sha_spec.rb +67 -0
  97. data/spec/github/pull_requests/comments/create_spec.rb +1 -1
  98. data/spec/github/pull_requests/comments/edit_spec.rb +1 -1
  99. data/spec/github/pull_requests/comments/get_spec.rb +1 -1
  100. data/spec/github/pull_requests/create_spec.rb +1 -1
  101. data/spec/github/pull_requests/get_spec.rb +1 -1
  102. data/spec/github/pull_requests/update_spec.rb +1 -1
  103. data/spec/github/repos/branch_spec.rb +1 -1
  104. data/spec/github/repos/comments/create_spec.rb +1 -1
  105. data/spec/github/repos/comments/get_spec.rb +1 -1
  106. data/spec/github/repos/comments/update_spec.rb +1 -1
  107. data/spec/github/repos/commits/get_spec.rb +1 -1
  108. data/spec/github/repos/create_spec.rb +1 -1
  109. data/spec/github/repos/downloads/create_spec.rb +1 -1
  110. data/spec/github/repos/downloads/get_spec.rb +1 -1
  111. data/spec/github/repos/edit_spec.rb +1 -1
  112. data/spec/github/repos/forks/create_spec.rb +1 -1
  113. data/spec/github/repos/get_spec.rb +1 -1
  114. data/spec/github/repos/hooks/create_spec.rb +1 -1
  115. data/spec/github/repos/hooks/edit_spec.rb +1 -1
  116. data/spec/github/repos/hooks/get_spec.rb +1 -1
  117. data/spec/github/repos/languages_spec.rb +1 -1
  118. data/spec/github/repos/merging/merge_spec.rb +1 -1
  119. data/spec/github/repos/statuses/create_spec.rb +1 -1
  120. data/spec/github/repos/tags_spec.rb +1 -1
  121. data/spec/github/repos/teams_spec.rb +1 -1
  122. data/spec/github/request/endpoint_spec.rb +24 -0
  123. data/spec/github/request/request_spec.rb +38 -0
  124. data/spec/github/{result_spec.rb → response_wrapper_spec.rb} +14 -13
  125. data/spec/github/users/emails/list_spec.rb +1 -1
  126. data/spec/github/users/get_spec.rb +2 -7
  127. data/spec/github/users/keys/create_spec.rb +1 -1
  128. data/spec/github/users/keys/get_spec.rb +1 -1
  129. data/spec/github/users/keys/update_spec.rb +1 -1
  130. data/spec/github/users/update_spec.rb +1 -1
  131. data/spec/github_spec.rb +1 -6
  132. data/spec/{github/activity → integration}/activity_spec.rb +0 -0
  133. data/spec/{github/gists → integration}/gists_spec.rb +2 -0
  134. data/spec/{github/git_data → integration}/git_data_spec.rb +0 -0
  135. data/spec/{github/issues → integration}/issues_spec.rb +2 -0
  136. data/spec/integration/options_spec.rb +103 -23
  137. data/spec/{github/orgs → integration}/orgs_spec.rb +0 -0
  138. data/spec/{github/pull_requests → integration}/pull_requests_spec.rb +0 -0
  139. data/spec/{github → integration}/repos_spec.rb +2 -0
  140. data/spec/{github/users → integration}/users_spec.rb +0 -0
  141. data/spec/shared/array_of_resources_behaviour.rb +1 -1
  142. metadata +55 -46
  143. data/lib/github_api/page_uri_processor.rb +0 -25
  144. data/lib/github_api/response/helpers.rb +0 -21
  145. data/spec/github/page_iterator_spec.rb +0 -260
  146. data/spec/github/response/helpers_spec.rb +0 -16
@@ -41,7 +41,7 @@ describe Github::PullRequests::Comments, '#create' do
41
41
 
42
42
  it "should return the resource" do
43
43
  pull_request = subject.create user, repo, pull_request_id, inputs
44
- pull_request.should be_a Hashie::Mash
44
+ pull_request.should be_a Github::ResponseWrapper
45
45
  end
46
46
 
47
47
  it "should get the request information" do
@@ -33,7 +33,7 @@ describe Github::PullRequests::Comments, '#edit' do
33
33
 
34
34
  it "should return the resource" do
35
35
  comment = subject.edit user, repo, comment_id, inputs
36
- comment.should be_a Hashie::Mash
36
+ comment.should be_a Github::ResponseWrapper
37
37
  end
38
38
 
39
39
  it "should get the comment information" do
@@ -39,7 +39,7 @@ describe Github::PullRequests::Comments, '#get' do
39
39
 
40
40
  it "should return mash" do
41
41
  comment = subject.get user, repo, comment_id
42
- comment.should be_a Hashie::Mash
42
+ comment.should be_a Github::ResponseWrapper
43
43
  end
44
44
  end
45
45
 
@@ -36,7 +36,7 @@ describe Github::PullRequests, '#create' do
36
36
 
37
37
  it "should return the resource" do
38
38
  pull_request = subject.create user, repo, inputs
39
- pull_request.should be_a Hashie::Mash
39
+ pull_request.should be_a Github::ResponseWrapper
40
40
  end
41
41
 
42
42
  it "should get the request information" do
@@ -38,7 +38,7 @@ describe Github::PullRequests, '#get' do
38
38
 
39
39
  it "should return mash" do
40
40
  pull_request = subject.get user, repo, number
41
- pull_request.should be_a Hashie::Mash
41
+ pull_request.should be_a Github::ResponseWrapper
42
42
  end
43
43
  end
44
44
 
@@ -35,7 +35,7 @@ describe Github::PullRequests, '#update' do
35
35
 
36
36
  it "should return the resource" do
37
37
  pull_request = subject.update user, repo, number, inputs
38
- pull_request.should be_a Hashie::Mash
38
+ pull_request.should be_a Github::ResponseWrapper
39
39
  end
40
40
 
41
41
  it "should get the pull_request information" do
@@ -26,7 +26,7 @@ describe Github::Repos, '#branch' do
26
26
 
27
27
  it "should return repository mash" do
28
28
  repo_branch = subject.branch user, repo, branch
29
- repo_branch.should be_a Hashie::Mash
29
+ repo_branch.should be_a Github::ResponseWrapper
30
30
  end
31
31
 
32
32
  it "should get repository branch information" do
@@ -40,7 +40,7 @@ describe Github::Repos::Comments, '#create' do
40
40
 
41
41
  it "should return the resource" do
42
42
  comment = subject.create user, repo, sha, inputs
43
- comment.should be_a Hashie::Mash
43
+ comment.should be_a Github::ResponseWrapper
44
44
  end
45
45
 
46
46
  it "should get the commit comment information" do
@@ -37,7 +37,7 @@ describe Github::Repos::Comments, '#get' do
37
37
 
38
38
  it "should return mash" do
39
39
  commit_comment = subject.get user, repo, comment_id
40
- commit_comment.should be_a Hashie::Mash
40
+ commit_comment.should be_a Github::ResponseWrapper
41
41
  end
42
42
  end
43
43
 
@@ -32,7 +32,7 @@ describe Github::Repos::Comments, '#update' do
32
32
 
33
33
  it "should return the resource" do
34
34
  comment = subject.update user, repo, comment_id, inputs
35
- comment.should be_a Hashie::Mash
35
+ comment.should be_a Github::ResponseWrapper
36
36
  end
37
37
 
38
38
  it "should get the commit comment information" do
@@ -39,7 +39,7 @@ describe Github::Repos::Commits, '#get' do
39
39
 
40
40
  it "should return mash" do
41
41
  commit = subject.get user, repo, sha
42
- commit.should be_a Hashie::Mash
42
+ commit.should be_a Github::ResponseWrapper
43
43
  end
44
44
  end
45
45
 
@@ -48,7 +48,7 @@ describe Github::Repos, '#create' do
48
48
 
49
49
  it "should return mash type" do
50
50
  repository = subject.create inputs
51
- repository.should be_a Hashie::Mash
51
+ repository.should be_a Github::ResponseWrapper
52
52
  end
53
53
  end
54
54
 
@@ -44,7 +44,7 @@ describe Github::Repos::Downloads, '#create' do
44
44
 
45
45
  it "should return the resource" do
46
46
  download = subject.create user, repo, inputs
47
- download.should be_a Hashie::Mash
47
+ download.should be_a Github::ResponseWrapper
48
48
  end
49
49
 
50
50
  it "should get the download information" do
@@ -39,7 +39,7 @@ describe Github::Repos::Downloads, '#get' do
39
39
 
40
40
  it "should return mash" do
41
41
  download = subject.get user, repo, download_id
42
- download.should be_a Hashie::Mash
42
+ download.should be_a Github::ResponseWrapper
43
43
  end
44
44
  end
45
45
 
@@ -44,7 +44,7 @@ describe Github::Repos, '#edit' do
44
44
 
45
45
  it "should return resource" do
46
46
  repository = subject.edit user, repo, inputs
47
- repository.should be_a Hashie::Mash
47
+ repository.should be_a Github::ResponseWrapper
48
48
  end
49
49
 
50
50
  it "should be able to retrieve information" do
@@ -27,7 +27,7 @@ describe Github::Repos::Forks, '#create' do
27
27
 
28
28
  it "should return the resource" do
29
29
  fork = subject.create user, repo, inputs
30
- fork.should be_a Hashie::Mash
30
+ fork.should be_a Github::ResponseWrapper
31
31
  end
32
32
 
33
33
  it "should get the fork information" do
@@ -35,7 +35,7 @@ describe Github::Repos, '#get' do
35
35
 
36
36
  it "should return repository mash" do
37
37
  repository = subject.get user, repo
38
- repository.should be_a Hashie::Mash
38
+ repository.should be_a Github::ResponseWrapper
39
39
  end
40
40
 
41
41
  it "should get repository information" do
@@ -52,7 +52,7 @@ describe Github::Repos::Hooks, '#create' do
52
52
 
53
53
  it "should return the resource" do
54
54
  hook = subject.create user, repo, inputs
55
- hook.should be_a Hashie::Mash
55
+ hook.should be_a Github::ResponseWrapper
56
56
  end
57
57
 
58
58
  it "should get the hook information" do
@@ -61,7 +61,7 @@ describe Github::Repos::Hooks, '#list' do
61
61
 
62
62
  it "should return resource" do
63
63
  hook = subject.edit user, repo, hook_id, inputs
64
- hook.should be_a Hashie::Mash
64
+ hook.should be_a Github::ResponseWrapper
65
65
  end
66
66
 
67
67
  it "should be able to retrieve information" do
@@ -38,7 +38,7 @@ describe Github::Repos::Hooks, '#get' do
38
38
 
39
39
  it "should return mash" do
40
40
  hook = subject.get user, repo, hook_id
41
- hook.should be_a Hashie::Mash
41
+ hook.should be_a Github::ResponseWrapper
42
42
  end
43
43
  end
44
44
 
@@ -33,7 +33,7 @@ describe Github::Repos, '#languages' do
33
33
 
34
34
  it "should return hash of languages" do
35
35
  languages = subject.languages user, repo
36
- languages.should be_an Hash
36
+ languages.should be_an Github::ResponseWrapper
37
37
  languages.should have(2).keys
38
38
  end
39
39
 
@@ -42,7 +42,7 @@ describe Github::Repos::Merging, '#merge' do
42
42
 
43
43
  it "should return the resource" do
44
44
  merge = subject.merge user, repo, inputs
45
- merge.should be_a Hashie::Mash
45
+ merge.should be_a Github::ResponseWrapper
46
46
  end
47
47
 
48
48
  it "should get the commit comment information" do
@@ -38,7 +38,7 @@ describe Github::Repos::Statuses, '#create' do
38
38
 
39
39
  it "should return the resource" do
40
40
  status = subject.create user, repo, sha, inputs
41
- status.should be_a Hashie::Mash
41
+ status.should be_a Github::ResponseWrapper
42
42
  end
43
43
 
44
44
  it "should get the status information" do
@@ -33,7 +33,7 @@ describe Github::Repos, '#tags' do
33
33
 
34
34
  it "should return array of resources" do
35
35
  tags = subject.tags user, repo
36
- tags.should be_an Array
36
+ tags.should be_an Enumerable
37
37
  tags.should have(1).items
38
38
  end
39
39
 
@@ -33,7 +33,7 @@ describe Github::Repos, '#teams' do
33
33
 
34
34
  it "should return array of resources" do
35
35
  teams = subject.teams user, repo
36
- teams.should be_an Array
36
+ teams.should be_an Enumerable
37
37
  teams.should have(1).items
38
38
  end
39
39
 
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Github::API, 'endpoint' do
6
+ let(:endpoint) { "https://my-company/api/v3/" }
7
+ let(:options) { {:endpoint => endpoint } }
8
+ let(:path) { "/repos/GitHub/issues-dev/issues" }
9
+
10
+ subject(:api) { described_class.new(options) }
11
+
12
+ before {
13
+ stub_get(path, 'https://my-company/api/v3').
14
+ to_return(:body => "[]", :status => 200, :headers =>{})
15
+ }
16
+
17
+ its(:endpoint) { should == endpoint }
18
+
19
+ it "doesn't truncate endpoint" do
20
+ expect {
21
+ api.get_request(path)
22
+ }.not_to raise_error(WebMock::NetConnectNotAllowedError)
23
+ end
24
+ end
@@ -0,0 +1,38 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Github::API, '#request' do
6
+ let(:token) { "2fdsfdo23fsdf3omkhen34n2jh" }
7
+ let(:per_page) { 100 }
8
+ let(:path) { "/api/v3/repos/GitHub/issues-dev/issues" }
9
+
10
+ let(:url_prefix) { "https://my-company/api/v3/repos/GitHub/issues-dev/issues?access_token=#{token}&page=2&per_page=#{per_page}" }
11
+
12
+ let(:conn) { Faraday::Connection.new }
13
+
14
+ before {
15
+ conn.url_prefix = url_prefix
16
+ stub_get(path, 'https://my-company').
17
+ with(:query => {'access_token' => token, :page => 2, :per_page => per_page}).
18
+ to_return(:body => "", :status => 200, :headers =>{})
19
+ }
20
+
21
+ subject { described_class.new() }
22
+
23
+ it 'sets connection path correctly' do
24
+ expect(conn.path_prefix).to eql(path)
25
+ end
26
+
27
+ it 'responds to get request' do
28
+ expect(subject).to respond_to(:get_request)
29
+ end
30
+
31
+ it 'handles enterprise uri correctly' do
32
+ subject.stub(:connection).and_return conn
33
+
34
+ expect {
35
+ subject.get_request(path)
36
+ }.not_to raise_error(WebMock::NetConnectNotAllowedError)
37
+ end
38
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe Github::Result do
5
+ describe Github::ResponseWrapper do
6
6
  let(:github) { Github.new }
7
7
  let(:user) { 'wycats' }
8
8
  let(:res) { github.activity.events.public({ 'per_page' => 20 }) }
@@ -45,35 +45,35 @@ describe Github::Result do
45
45
  end
46
46
 
47
47
  it "should read response content_type " do
48
- res.content_type.should match 'application/json'
48
+ res.headers.content_type.should match 'application/json'
49
49
  end
50
50
 
51
51
  it "should read response content_length " do
52
- res.content_length.should match '344'
52
+ res.headers.content_length.should match '344'
53
53
  end
54
54
 
55
55
  it "should read response ratelimit limit" do
56
- res.ratelimit_limit.should == '5000'
56
+ res.headers.ratelimit_limit.should == '5000'
57
57
  end
58
58
 
59
59
  it "should read response ratelimit remaining" do
60
- res.ratelimit_remaining.should == '4999'
60
+ res.headers.ratelimit_remaining.should == '4999'
61
61
  end
62
62
 
63
63
  it "should read response status" do
64
- res.status.should be 200
64
+ res.headers.status.should be 200
65
65
  end
66
66
 
67
67
  it 'should read response etag' do
68
- res.etag.should eql "\"d9a88f20567726e29d35c6fae87cef2f\""
68
+ res.headers.etag.should eql "\"d9a88f20567726e29d35c6fae87cef2f\""
69
69
  end
70
70
 
71
71
  it 'should read response date' do
72
- res.date.should eql "Sun, 05 Feb 2012 15:02:34 GMT"
72
+ res.headers.date.should eql "Sun, 05 Feb 2012 15:02:34 GMT"
73
73
  end
74
74
 
75
75
  it 'should read response server' do
76
- res.server.should eql "nginx/1.0.4"
76
+ res.headers.server.should eql "nginx/1.0.4"
77
77
  end
78
78
 
79
79
  it "should assess successful" do
@@ -85,8 +85,9 @@ describe Github::Result do
85
85
  end
86
86
 
87
87
  context "pagination methods" do
88
- let(:env) { {:response_headers => {}}}
89
- let(:iterator) { Github::PageIterator.new(env) }
88
+ let(:links) { Github::PageLinks.new({}) }
89
+ let(:current_api) { stub(:api).as_null_object }
90
+ let(:iterator) { Github::PageIterator.new(links, current_api) }
90
91
 
91
92
  before do
92
93
  described_class.stub(:page_iterator).and_return iterator
@@ -98,8 +99,8 @@ describe Github::Result do
98
99
 
99
100
  %w[ next prev ].each do |link|
100
101
  context "#{link}_page" do
101
- it "should return collection of resources" do
102
- res.send(:"#{link}_page").should be_an Array
102
+ it "responds to #{link}_page request" do
103
+ res.send(:"#{link}_page").should be_nil
103
104
  end
104
105
 
105
106
  it 'should have no link information' do
@@ -29,7 +29,7 @@ describe Github::Users::Emails, '#list' do
29
29
 
30
30
  it "should return resource" do
31
31
  emails = subject.list
32
- emails.should be_an Array
32
+ emails.should be_an Enumerable
33
33
  emails.should have(2).items
34
34
  end
35
35
 
@@ -24,14 +24,9 @@ describe Github::Users, '#get' do
24
24
  a_get(request_path).should have_been_made
25
25
  end
26
26
 
27
- it "should return resource" do
27
+ it "should be a response wrapper" do
28
28
  user_resource = subject.get :user => user
29
- user_resource.should be_a Hash
30
- end
31
-
32
- it "should be a mash type" do
33
- user_resource = subject.get :user => user
34
- user_resource.should be_a Hashie::Mash
29
+ user_resource.should be_a Github::ResponseWrapper
35
30
  end
36
31
 
37
32
  it "should get org information" do
@@ -35,7 +35,7 @@ describe Github::Users::Keys, '#create' do
35
35
 
36
36
  it "should return the resource" do
37
37
  key = subject.create inputs
38
- key.should be_a Hashie::Mash
38
+ key.should be_a Github::ResponseWrapper
39
39
  end
40
40
 
41
41
  it "should get the key information" do
@@ -39,7 +39,7 @@ describe Github::Users::Keys, '#get' do
39
39
 
40
40
  it "should return mash" do
41
41
  key = subject.get key_id
42
- key.should be_a Hashie::Mash
42
+ key.should be_a Github::ResponseWrapper
43
43
  end
44
44
  end
45
45
 
@@ -40,7 +40,7 @@ describe Github::Users::Keys, '#update' do
40
40
 
41
41
  it "should return the resource" do
42
42
  key = subject.update key_id, inputs
43
- key.should be_a Hashie::Mash
43
+ key.should be_a Github::ResponseWrapper
44
44
  end
45
45
 
46
46
  it "should get the key information" do
@@ -40,7 +40,7 @@ describe Github::Users, '#update' do
40
40
 
41
41
  it "should return the resource" do
42
42
  user_resource = subject.update inputs
43
- user_resource.should be_a Hashie::Mash
43
+ user_resource.should be_a Github::ResponseWrapper
44
44
  end
45
45
 
46
46
  it "should get the resource information" do