Vitali Tatarintev
24493c5023
Replace it_behaves_like with include_examples
...
Improve specs output readability by replacing
`it_behaves_like` with `include_examples`
in `BeSuccessMatcher`
2019-08-28 08:55:46 +02:00
Vitali Tatarintev
69dbc5a527
Remove Rubocop::SpecHelper file
2019-08-28 08:48:14 +02:00
Vitali Tatarintev
0fee944741
Inline shared examples for BeSuccessMatcher
...
Former shared examples were used only once.
Inlining them makes tests more clear.
2019-08-28 08:43:47 +02:00
Vitali Tatarintev
17385f4dc4
Refactor BeSuccessMatcher specs for readability
2019-08-28 08:43:47 +02:00
Vitali Tatarintev
99b27e6951
Utilize Rubocop's Include for BeSuccessMatcher
...
Use Rubocop's Include
instead of manually checking the matcher in controllers specs.
2019-08-28 08:43:47 +02:00
Vitali Tatarintev
b61d26f496
Add support of not_to/to_not to BeSuccessMatcher
...
BeSuccessMatcher now supports following examples:
```
expect(response).to be_success
expect(response).to_not be_success
expect(response).not_to be_success
is_expected.to be_success
is_expected.to_not be_success
is_expected.not_to be_success
```
2019-08-28 08:43:47 +02:00
Vitali Tatarintev
23da356dd1
Refactor BeSuccessMatcher specs
2019-08-28 08:43:47 +02:00
Vitali Tatarintev
e1b8b93207
Replace double quotes with single quotes
2019-08-28 08:43:47 +02:00
Vitali Tatarintev
d40b7ea375
Enable frozen string literal
2019-08-28 08:43:47 +02:00
Vitali Tatarintev
3a71ab523e
Autocorrect be_success
to be_successful
2019-08-28 08:43:47 +02:00
Vitali Tatarintev
4f2ac51644
Add Rubocop check to avoid using be_success
...
Prevent using `be_success` call in controller specs to avoid
getting following deprecation warning:
```
DEPRECATION WARNING: The success? predicate is deprecated and
will be removed in Rails 6.0.
Please use successful? as provided by Rack::Response::Helpers.
```
2019-08-28 08:43:47 +02:00