Skip to content

Commit 1d91d06

Browse files
committed
Change specs to stop using global namespace and change code formatting.
1 parent 7788b61 commit 1d91d06

File tree

6 files changed

+27
-25
lines changed

6 files changed

+27
-25
lines changed

spec/unit/client/projects/cards/create_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
before do
1616
subject.oauth_token = OAUTH_TOKEN
17-
stub_post(request_path).with(body: inputs)
18-
.to_return(body: body, status: status,
19-
headers: { content_type: "application/json; charset=utf-8" })
17+
stub_post(request_path).with(body: inputs).
18+
to_return(body: body, status: status,
19+
headers: { content_type: "application/json; charset=utf-8" })
2020
end
2121

2222
after { reset_authentication_for subject }
@@ -28,17 +28,17 @@
2828
context "for the authenticated user" do
2929
let(:request_path) { "/projects/columns/#{column_id}/cards?access_token=#{OAUTH_TOKEN}" }
3030

31-
it "should create resource" do
31+
it "creates resource" do
3232
subject.create column_id, inputs
3333
a_post(request_path).with(body: inputs).should have_been_made
3434
end
3535

36-
it "should return the resource" do
36+
it "returns the resource" do
3737
card = subject.create column_id, inputs
3838
expect(card.note).to eq 'Add payload for delete Project column'
3939
end
4040

41-
it "should return mash type" do
41+
it "returns mash type" do
4242
card = subject.create column_id, inputs
4343
expect(card).to be_a Github::ResponseWrapper
4444
end

spec/unit/client/projects/cards/delete_spec.rb

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

33
require 'spec_helper'
44

5-
describe Github::Client::Projects::Cards, '#delete' do
5+
RSpec.describe Github::Client::Projects::Cards, '#delete' do
66
let(:card_id) { 1478 }
77
let(:request_path) { "/projects/columns/cards/#{card_id}" }
88
let(:body) { '' }
99
let(:status) { 204 }
1010

1111
before do
12-
stub_delete(request_path).to_return(body: body, status: status,
13-
headers: { content_type: "application/json; charset=utf-8" })
12+
stub_delete(request_path).
13+
to_return(body: body, status: status,
14+
headers: { content_type: "application/json; charset=utf-8" })
1415
end
1516

1617
after { reset_authentication_for subject }
1718

1819
it { expect(subject).to respond_to :remove }
1920

20-
it "should delete the resource successfully" do
21+
it "deletes the resource successfully" do
2122
subject.delete card_id
2223
expect(a_delete(request_path)).to have_been_made
2324
end
2425

25-
it "should fail to delete resource without 'id' parameter" do
26+
it "fails to delete resource without 'id' parameter" do
2627
expect { subject.delete }.to raise_error(ArgumentError)
2728
end
2829

spec/unit/client/projects/cards/get_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
let(:status) { 200 }
1010

1111
before do
12-
stub_get(request_path).to_return(body: body, status: status,
13-
headers: { content_type: "application/json; charset=utf-8" })
12+
stub_get(request_path).
13+
to_return(body: body, status: status,
14+
headers: { content_type: "application/json; charset=utf-8" })
1415
end
1516

1617
after { reset_authentication_for(subject) }

spec/unit/client/projects/cards/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::Projects::Cards, '#list' do
5+
RSpec.describe Github::Client::Projects::Cards, '#list' do
66
let(:column_id) { 367 }
77
let(:request_path) { "/projects/columns/#{column_id}/cards" }
88

spec/unit/client/projects/cards/move_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1+
# encoding: utf-8
12
# frozen_string_literal: true
23

34
require 'spec_helper'
45

5-
describe Github::Client::Projects::Cards, '#move' do
6+
RSpec.describe Github::Client::Projects::Cards, '#move' do
67
let(:card_id) { 1478 }
78
let(:request_path) { "/projects/columns/cards/#{card_id}/moves" }
89
let(:body) { '' }
910
let(:status) { 204 }
1011
let(:inputs) do
11-
{
12-
position: "after:3"
13-
}
12+
{ position: "after:3" }
1413
end
1514

1615
before do
17-
stub_post(request_path).with(body: inputs.to_json).to_return(body: body, status: status,
18-
headers: { content_type: "application/json; charset=utf-8" })
16+
stub_post(request_path).with(body: inputs.to_json).
17+
to_return(body: body, status: status,
18+
headers: { content_type: "application/json; charset=utf-8" })
1919
end
2020

2121
after { reset_authentication_for subject }
2222

23-
it "should move the resource successfully" do
23+
it "moves the resource successfully" do
2424
subject.move card_id, inputs
2525
expect(a_post(request_path)).to have_been_made
2626
end
2727

28-
it "should fail to move resource without 'id' parameter" do
28+
it "fails to move resource without 'id' parameter" do
2929
expect { subject.move inputs }.to raise_error(ArgumentError)
3030
end
3131

spec/unit/client/projects/cards/update_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
end
1515

1616
before do
17-
stub_patch(request_path).with(body: inputs)
18-
.to_return(body: body, status: status,
19-
headers: { content_type: 'application/json; charset=utf-8' })
17+
stub_patch(request_path).with(body: inputs).
18+
to_return(body: body, status: status,
19+
headers: { content_type: 'application/json; charset=utf-8' })
2020
end
2121

2222
after { reset_authentication_for(subject) }

0 commit comments

Comments
 (0)