Code style checking for RSpec files.
MIT License
Bot releases are visible (Hide)
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)Published by bquorning almost 2 years ago
RSpec/RepeatedDescription
when different its block expectations are used. (@ydah)named_only
style to RSpec/NamedSubject
. (@kuahyeow)RSpec/FactoryBot/ConsistentParenthesesStyle
to ignore calls without the first positional argument. (@pirj)RSpec/FactoryBot/ConsistentParenthesesStyle
to ignore calls inside a Hash or an Array. (@pirj)RSpec/NestedGroups
to correctly use AllowedGroups
config. (@samrjenkins)Runners
and HookScopes
RSpec DSL elements from configuration. (@pirj)with default RSpec/Language config
helper to lib
(under rubocop/rspec/shared_contexts/default_rspec_language_config_context
), to allow use for downstream cops based on RuboCop::Cop::RSpec::Base
. (@smcgivern)Published by bquorning almost 2 years ago
FactoryBot/ConsistentParenthesesStyle
with omit_parentheses
option when method name and first argument are not on same line. (@ydah)RSpec/ExampleWording
for insufficient example wording. (@pirj)RSpec/SortMetadata
not to reorder arguments of include_
/it_behaves_like
. (@pirj)RSpec/NoExpectationExample
when allowed pattern methods with arguments. (@ydah)RSpec/FilePath
so that it only checks suffix when path is under spec/routing or type is defined as routing. (@r7kamura)Published by bquorning almost 2 years ago
RSpec/Rails/InferredSpecType
with redundant type before other Hash metadata. (@ydah)Published by bquorning almost 2 years ago
require_implicit
style to RSpec/ImplicitSubject
. (@r7kamura)RSpec/Capybara/SpecificMatcher
when have_css("a")
without attribute. (@ydah)RSpec/ExampleWording
cop to raise error for insufficient descriptions. (@akrox58)RSpec/Capybara/NegationMatcher
cop. (@ydah)AllowedPatterns
configuration option to RSpec/NoExpectationExample
. (@ydah)RSpec/NoExpectationExample
cop to ignore examples skipped or pending via metadata. (@pirj)RSpec/FactoryBot/ConsistentParenthesesStyle
cop. (@Liberatys)RSpec/Rails/InferredSpecType
cop. (@r7kamura)RSpec/Capybara/SpecificActions
cop. (@ydah)config/default.yml
removing deprecated option to make the config correctable by users. (@ignaciovillaverde)include_examples
in RSpec/LetBeforeExamples
. (@pirj)RSpec/SortMetadata
cop. (@leoarnold)RSpec/SubjectDeclaration
. (@ydah)Published by bquorning about 2 years ago
RSpec/Capybara/SpecificFinders
with no parentheses. (@ydah)RSpec/NoExpectationExample
with pending using skip
or pending
inside an example. (@ydah)have_text
and have_content
that raise ArgumentError
with RSpec/Capybara/VisibilityMatcher
where :visible
is an invalid option. (@ydah)RSpec/Capybara/VisibilityMatcher
with negative matchers. (@ydah)Published by bquorning about 2 years ago
Include config/obsoletion.yml in the gemspec. (@hosamaly)
Published by bquorning about 2 years ago
RSpec/FilePath
cop missing mismatched expanded namespace. (@sl4vr)AllowConsecutiveOneLiners
(default true) option for Rspec/EmptyLineAfterHook
cop. (@ngouy)RSpec/EmptyExampleGroup
. (@r7kamura)RSpec/ChangeByZero
with compound expressions using &
or |
operators. (@BrianHawley)RSpec/NoExpectationExample
. (@r7kamura)RSpec/Capybara/SpecificMatcher
. (@ydah)RSpec/Capybara/SpecificMatcher
for have_field
. (@ydah)RSpec/Capybara/SpecificMatcher
when may not have a href
by have_link
. (@ydah)NegatedMatcher
configuration option to RSpec/ChangeByZero
. (@ydah)RSpec/Capybara/SpecificFinders
cop. (@ydah)RSpec/AroundBlock
, RSpec/EmptyLineAfterHook
, RSpec/ExpectInHook
, RSpec/HookArgument
, RSpec/HooksBeforeExamples
, RSpec/IteratedExpectation
, and RSpec/NoExpectationExample
. (@ydah)rubocop --show-docs-url
. (@r7kamura)AllowedGroups
configuration option to RSpec/NestedGroups
. (@ydah)IgnoredPatterns
option in favor of the AllowedPatterns
options. (@ydah)AllowedPatterns
configuration option to RSpec/ContextWording
. (@ydah)RSpec/ClassCheck
cop. (@r7kamura)RSpec/Capybara/SpecificMatcher
when pseudo-classes. (@ydah)RSpec/SubjectStub
when the subject is declared with the subject!
method and called by name. (@eikes)Array.new(n)
on RSpec/FactoryBot/CreateList
cop. (@r7kamura)Published by bquorning about 2 years ago
RSpec/Capybara/SpecificMatcher
. (@ydah)Published by bquorning about 2 years ago
RSpec/FilePath
cop when second argument contains spaces. (@tejasbubane)RSpec/Capybara/SpecificMatcher
cop. (@ydah)FactoryBot/CreateList
when a n.times block is including method calls in the factory create arguments. (@ngouy)RSpec/RSpec/FactoryBot/CreateList
cop for empty block. (@tejasbubane)RSpec/MultipleExpectations
cop documentation with examples of aggregate_failures use. (@edgibbs)RSpec/VerifiedDoubleReference
. (@Drowze)RSpec/Rails/HaveHttpStatus
cop. (@akiomik)Published by bquorning over 2 years ago
RSpec/ExpectChange
flagging chained method calls. (@pirj)Published by bquorning over 2 years ago
RSpec/ChangeByZero
cop. (@ydah)RSpec/ExpectChange
to detect namespaced and top-level constants. (@M-Yamashita01)Metrics/BlockLength
to exclude spec files. (@luke-hill)Published by bquorning over 2 years ago
RSpec/EmptyExampleGroup
when expectations in case statement. (@ydah)RSpec/VerifiedDoubleReference
cop. (@t3h2mas)RSpec/BeNil
cop configurable with a be_nil
style and a be
style. (@bquorning)Capybara/CurrentPathExpectation
autocorrect incompatible with Style/TrailingCommaInArguments
autocorrect. (@ydah)