Skip to content

Commit af44f0a

Browse files
committed
Rename header feature spec, line break change, avoid short sentences
1 parent 9626ec0 commit af44f0a

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

features/controller_specs/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ To specify outcomes, you can use:
6363

6464
## Headers
6565

66-
We encourage you to use [request specs](https://relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec) if you want to set headers in your call.
67-
If you still want to use controller specs with custom http headers you can use `request.headers`:
66+
We encourage you to use [request specs](https://relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec) if you want to set headers in your call. If you still want to use controller specs with custom http headers you can use `request.headers`:
6867

6968
require "rails_helper"
7069

71-
RSpec.describe TeamsController, :type => :controller do
70+
RSpec.describe TeamsController, type: :controller do
7271
describe "GET index"
7372
it "returns a 200" do
7473
request.headers["Authorization"] = "foo"

features/controller_specs/headers.feature renamed to features/controller_specs/setting_request_headers.feature

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
Feature: Headers
1+
Feature: Setting request headers
22

33
We recommend you to switch to request specs instead of controller specs if you want to set
4-
headers in your call.
5-
If you still want to set headers in controller specs, you can use `request.headers` as
6-
mentioned bellow.
4+
headers in your call. If you still want to set headers in controller specs, you can use
5+
`request.headers` as mentioned bellow.
76

87
Scenario: Setting a header value in a controller spec
98
Given a file named "spec/controllers/application_controller_spec.rb" with:
109
"""ruby
1110
require "rails_helper"
1211
13-
RSpec.describe ApplicationController, :type => :controller do
12+
RSpec.describe ApplicationController, type" :controller do
1413
controller do
1514
def show
1615
if request.headers["Authorization"] == "foo"

0 commit comments

Comments
 (0)