ydah/rubocop-committee

View on GitHub
docs/modules/ROOT/pages/cops_committee.adoc

Summary

Maintainability
Test Coverage
= Committee

== Committee/RedundantResponseStatusAssertions

|===
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Pending
| Yes
| Yes
| 0.1
| -
|===

Check for validation of redundant response HTTP status codes.

=== Examples

[source,ruby]
----
# bad
it 'does something' do
  subject
  expect(response).to have_http_status 400
  assert_schema_conform(400)
end

# good
it 'does something' do
  subject
  assert_schema_conform(400)
end
----

== Committee/UnspecifiedExpectedStatus

|===
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Pending
| Yes
| Yes
| 0.1
| -
|===

Check if the status code is specified as an argument to the method of the Committee
where the expected response HTTP status code is required.

=== Examples

[source,ruby]
----
# bad
it 'does something' do
  subject
  assert_schema_conform
end

# good
it 'does something' do
  subject
  assert_schema_conform(200)
end
----