Code style checking for RSpec files.
MIT License
Bot releases are hidden (Show)
Published by ydah 7 months ago
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)Published by bquorning 8 months ago
Published by bquorning 8 months ago
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)Published by bquorning 10 months ago
RSpec/SharedExamples
when using examples without argument. (@ydah)Published by bquorning 10 months ago
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)Published by bquorning 12 months ago
RSpec/Rails/HttpStatus
. (@ydah)RSpec/SpecFilePathFormat
like RSpec/FilePath
. (@ydah)RSpec/MetadataStyle
with example groups having multiple string arguments. (@franzliedke)Published by bquorning about 1 year ago
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)Published by bquorning about 1 year ago
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)Published by bquorning about 1 year ago
RSpec/ReceiveMessages
when method is only non-word character. (@marocchino)RSpec/ReceiveMessages
when return with splat. (@marocchino)Published by bquorning about 1 year ago
Safe: false
for RSpec/Rails/NegationBeValid
cop. (@ydah)RSpec/ReceiveMessages
. (@bquorning)Published by bquorning about 1 year ago
RSpec/Rails/NegationBeValid
cop. (@ydah)RSpec/ExcessiveDocstringSpacing
when finds description with em space. (@ydah)RSpec/EmptyExampleGroup
when example group with examples defined in if
branch inside iterator. (@ydah)RSpec/ExpectActual
to include the word 'value'. (@corydiamand)RSpec/Pending
when it
without body. (@ydah)RSpec/ReceiveMessages
cop. (@ydah)**/spec/*
instead of spec/*
. (@ydah)AllowedIdentifiers
and AllowedPatterns
configuration option to RSpec/IndexedLet
. (@ydah)RSpec/NamedSubject
when block has no body. (@splattael)RSpec/LetBeforeExamples
autocorrect incompatible with RSpec/ScatteredLet
autocorrect. (@ydah)RSpec/Focus
to support shared_context
and shared_examples
(@tmaier)Published by bquorning over 1 year ago
rubocop-factory_bot
. The rubocop-factory_bot
repository is a dependency of rubocop-rspec
and the factory_bot cops are aliased (RSpec/FactoryBot/Foo
== FactoryBot/Foo
) until v3.0 is released, so the change will be invisible to users until then. (@ydah)Published by bquorning over 1 year ago
RSpec/IndexedLet
with suffixes after index-like numbers. (@pirj)RSpec/Rails/HaveHttpStatus
with comparison with strings containing non-numeric characters. (@ydah)RSpec/MatchArray
when match_array
with no argument. (@ydah)a_block_changing
and changing
for RSpec/ChangeByZero
. (@ydah)Published by bquorning over 1 year ago
RSpec/IndexedLet
cop. (@dmitrytsepelev)RSpec/BeEmpty
cop. (@ydah, @bquorning)RSpec/ScatteredSetup
. (@ydah)be_status
style for RSpec/Rails/HttpStatus
. (@ydah)RSpec/EmptyLineAfterExampleGroup
. (@pirj)RSpec/HaveHttpStatus
when using response.code
. (@ydah)RSpec/Rails/MinitestAssertions
(@mvz)RSpec/DescribedClassModuleWrapping
when RSpec.describe numblock is nested within a module. (@ydah)RSpec/FactoryBot/ConsistentParenthesesStyle
inside &&
, ||
and :?
when omit_parentheses
is on (@dmitrytsepelev)RSpec/PendingWithoutReason
when pending/skip has a reason inside an example group. (@ydah)RSpec/RedundantAround
when redundant numblock around
. (@ydah)RSpec/ContainExactly
to ignore calls with no arguments, and change RSpec/MatchArray
to ignore calls with an empty array literal argument. (@ydah, @bquorning)RSpec/MatchArray
and RSpec/ContainExactly
pending. (@ydah)Published by bquorning over 1 year ago
RSpec/PendingBlockInsideExample
cop. (@ydah)RSpec/RedundantAround
cop. (@r7kamura)RSpec/Rails/TravelAround
cop. (@r7kamura)RSpec/ContainExactly
and RSpec/MatchArray
cops. (@faucct)RSpec/PendingBlockInsideExample
cop to RSpec/SkipBlockInsideExample
. (@pirj)RSpec/ContextWording
when context is interpolated string literal or execute string. (@ydah)RSpec/DescribeMethod
when multi-line describe without #
and .
at the beginning. (@ydah, @pirj)RSpec/VariableName
when inside non-spec code. (@ydah)RSpec/VariableDefinition
when inside non-spec code. (@ydah)RSpec/PendingWithoutReason
when not inside example and pending/skip with block. (@ydah, @pirj)RSpec/PendingWithoutReason
when skip
is passed a block inside example. (@ydah, @pirj)RSpec/VerifiedDoubleReference
when namespaced class. (@ydah)send_pattern
/block_pattern
/numblock_pattern
helpers in favour of using node pattern explicitly. (@pirj, @ydah)Published by bquorning over 1 year ago
rubocop-capybara
version constraint to prevent sudden cop enabling when it hits 3.0. (@pirj)Published by bquorning almost 2 years ago
rubocop-capybara
. The rubocop-capybara
repository is a dependency of rubocop-rspec
and the Capybara cops are aliased (RSpec/Capybara/Foo
== Capybara/Foo
) until v3.0 is released, so the change will be invisible to users until then. (@pirj)Published by bquorning almost 2 years ago
RSpec/Pending
when using skipped in metadata is multiline string. (@ydah)RSpec/NoExpectationExample
when using skipped in metadata is multiline string. (@ydah)RSpec/ContextMethod
when multi-line context with #
at the beginning. (@ydah)RSpec/PredicateMatcher
when multiline expect and predicate method with heredoc. (@ydah)RSpec/PredicateMatcher
when include
with multiple argument. (@ydah)Published by bquorning almost 2 years ago
RSpec/PendingWithoutReason
when pending/skip is argument of methods. (@ydah)RSpec/Capybara/MatchStyle
cop. (@ydah)RSpec/Rails/MinitestAssertions
cop. (@ydah)RSpec/PendingWithoutReason
when not inside example. (@ydah)RSpec/PredicateMatcher
when using include
and respond_to
. (@ydah)RSpec/StubbedMock
when stubbed message expectation with a block and block parameter. (@ydah)Published by bquorning almost 2 years ago
RSpec/FactoryBot/FactoryNameStyle
cop. (@ydah)RSpec/Be
, RSpec/ExpectActual
, RSpec/ImplicitExpect
, RSpec/MessageSpies
, RSpec/PredicateMatcher
and RSpec/Rails/HaveHttpStatus
. (@ydah)n_times
style on RSpec/FactoryBot/CreateList
. (@r7kamura)RSpec/FactoryBot/ConsistentParenthesesStyle
when using generate
with multiple arguments. (@ydah)RSpec/BeEq
as Safe: false
(@r7kamura)RSpec/DuplicatedMetadata
cop. (@r7kamura)RSpec/BeEql
as Safe: false
. (@r7kamura)RSpec/PendingWithoutReason
cop. (@r7kamura)