Add a warning when doc string is not a string
Created by: pirj
Based on https://github.com/rspec/rspec-core/issues/2921#issuecomment-981149916
The first argument should be:
For example groups:
- a String. Either a textual description (
context "in the afternoon"
), or a quoted class name (describe "AdminUser"
) - a Class (
describe AdminUser
) - a NilClass (
context do
)
For examples:
- a String. A textual description (
it 'throws raw eggs at open source maintainers'
) - a NilClass (
specify do
)
For shared examples/contexts there is already an Shared example group names can only be a string, symbol or module
error.
Am I missing something?
Semi-related side note: we decided not to remove a semi-related described_class
in RSpec 4, even though it was previously planned.