diff --git a/_includes/describe.html b/_includes/describe.html index ef99a95..461dd30 100644 --- a/_includes/describe.html +++ b/_includes/describe.html @@ -33,7 +33,35 @@

{% endhighlight %} -

In request tests, describe the controller constant and its actions.

+

+ + Describing request tests + +

+ +

In request tests, describe the controller constant and its actions so one can easily spot what is being tested.

+ +
+{% highlight ruby %} +describe '/users', type: :request do + describe 'GET #index' do + it 'returns a successful response' do + get users_url + + expect(response.code).to eq('200') + end + end + + describe 'POST /users' do + it 'creates a user' do + post users_url, params: { user: { name: 'Tom Jobim' } } + + expect(User.last.name).to eq('Tom Jobim') + end + end +end +{% endhighlight %} +
{% highlight ruby %} diff --git a/_sass/custom/custom.scss b/_sass/custom/custom.scss index 20654de..b52fa17 100644 --- a/_sass/custom/custom.scss +++ b/_sass/custom/custom.scss @@ -103,7 +103,8 @@ margin-bottom: 4em; } - h2 { + h2, + h3 { &:first-child { margin-top: 0; }