Skip to content

Commit 8882fbd

Browse files
committed
GithubHelperSpec: Change Order of Methods to Improve Diff
1 parent 8ed0e7e commit 8882fbd

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

spec/github_helper_spec.rb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,6 @@
22
require 'webmock/rspec'
33

44
describe Fastlane::Helper::GithubHelper do
5-
describe '#initialize' do
6-
let(:client) do
7-
instance_double(
8-
Octokit::Client,
9-
user: instance_double('User', name: 'test'),
10-
'auto_paginate=': nil
11-
)
12-
end
13-
14-
before do
15-
allow(Octokit::Client).to receive(:new).and_return(client)
16-
end
17-
18-
it 'properly passes the token all the way down to the Octokit::Client' do
19-
expect(Octokit::Client).to receive(:new).with(access_token: 'Fake-GitHubToken-123')
20-
described_class.new(github_token: 'Fake-GitHubToken-123')
21-
end
22-
end
23-
245
describe 'download_file_from_tag' do
256
let(:test_repo) { 'repo-test/project-test' }
267
let(:test_tag) { '1.0' }
@@ -153,6 +134,25 @@ def mock_comment(body: '<!-- REUSE_ID: test-id --> Test', user_id: 1234)
153134
end
154135
end
155136

137+
describe '#initialize' do
138+
let(:client) do
139+
instance_double(
140+
Octokit::Client,
141+
user: instance_double('User', name: 'test'),
142+
'auto_paginate=': nil
143+
)
144+
end
145+
146+
before do
147+
allow(Octokit::Client).to receive(:new).and_return(client)
148+
end
149+
150+
it 'properly passes the token all the way down to the Octokit::Client' do
151+
expect(Octokit::Client).to receive(:new).with(access_token: 'Fake-GitHubToken-123')
152+
described_class.new(github_token: 'Fake-GitHubToken-123')
153+
end
154+
end
155+
156156
describe 'get_milestone' do
157157
let(:test_repo) { 'repo-test/project-test' }
158158
let(:test_milestones) { [{ title: '9.8' }, { title: '10.1' }, { title: '10.1.3 ❄️' }] }

0 commit comments

Comments
 (0)