Code style checking for RSpec files
RSpec/ExpectActual
. (@bquorning)RSpec/UndescriptiveLiteralsDescription
cop. (@ydah)RSpec/EmptyOutput
cop. (@bquorning)rubocop-rspec_rails
. The rubocop-rspec_rails
repository is a dependency of rubocop-rspec
and the cops related to rspec-rails are aliased (RSpec/Rails/Foo
== RSpecRails/Foo
) until v3.0 is released, so the change will be invisible to users until then. (@ydah)RSpec/IsExpectedSpecify
cop. (@ydah)RSpec/RepeatedSubjectCall
cop. (@drcapulet)assert_true
, assert_false
, assert_not_equal
, assert_not_nil
, *_empty
, *_predicate
, *_kind_of
, *_in_delta
, *_match
, *_instance_of
and *_includes
assertions in RSpec/Rails/MinitestAssertions
. (@ydah, @G-Rath)Rspec/BeEmpty
. (@G-Rath)RSpec/ExpectActual
when used with rspec-rails routing matchers. (@naveg)ResponseMethods
to RSpec/Rails/HaveHttpStatus
. (@ydah)RSpec/DescribedClass
when class with constant. (@ydah)RSpec/ExampleWithoutDescription
when specify
with multi-line block and missing description. (@ydah)RSpec/ChangeByZero
when compound expectations with line break before .by(0)
. (@ydah)RSpec/SharedExamples
when using examples without argument. (@ydah)RSpec/RedundantPredicateMatcher
cop. (@ydah)RSpec/RemoveConst
cop. (@swelther)RSpec/ExampleWording
. (@jdufresne)symbol
style for RSpec/SharedExamples
. (@jessieay)PendingWithoutReason
can detect violations inside shared groups. (@robinaugh)RSpec/Rails/HttpStatus
. (@ydah)RSpec/SpecFilePathFormat
like RSpec/FilePath
. (@ydah)RSpec/MetadataStyle
with example groups having multiple string arguments. (@franzliedke)RSpec/FilePath
and revert to enabled by default. If you have already moved to RSpec/SpecFilePathSuffix
and RSpec/SpecFilePathFormat
, disable RSpec/FilePath
explicitly as Enabled: false
. The RSpec/FilePath
before migration and the RSpec/SpecFilePathSuffix
and RSpec/SpecFilePathFormat
as the target are available respectively. (@ydah)RSpec/FilePath
into RSpec/SpecFilePathSuffix
and RSpec/SpecFilePathFormat
. RSpec/FilePath
cop is enabled by default, the two new cops are pending and need to be enabled explicitly. (@ydah)RSpec/Eq
cop. (@ydah)RSpec/MetadataStyle
and RSpec/EmptyMetadata
cops. (@r7kamura)RSpec/Rails/HttpStatus
when have_http_status
with string argument. (@ydah)RSpec/ExcessiveDocstringSpacing
finds a description with non-ASCII leading/trailing whitespace. (@bcgraham)RSpec/ReceiveMessages
when return values declared between stubs. (@marocchino)RSpec/Focus
when chained method call and inside define method. (@ydah)