Releases: rubocop/rubocop-rspec
Releases · rubocop/rubocop-rspec
RuboCop RSpec v1.30.0
- Add config to
RSpec/VerifiedDoubles
to enforcement of verification on unnamed doubles. (@BrentWheeldon) - Fix
FactoryBot/AttributeDefinedStatically
not working when there is a non-symbol key. (@vzvu3k6k) - Fix false positive in
RSpec/ImplicitSubject
whenis_expected
is used insideits()
block. (@Darhazer) - Add
single_statement_only
style toRSpec/ImplicitSubject
as a more relaxed alternative tosingle_line_only
. (@Darhazer) - Add
RSpec/UnspecifiedException
as a default cop to encourage more-specificexpect{}.to raise_error(ExceptionType)
, orraise_exception
style handling of exceptions. (@daveworth)
RuboCop RSpec v1.29.1
- Fix false negative in
FactoryBot/AttributeDefinedStatically
when attribute is defined onself
. (@Darhazer) RSpec/FactoryBot
cops will now also inspect thespec/factories.rb
path by default. (@bquorning)
RuboCop RSpec v1.29.0
RSpec/InstanceVariable
- Recommend local variables in addition tolet
. (@jaredbeck)- Add
RSpec/ImplicitSubject
cop. (@Darhazer) - Add
RSpec/HooksBeforeExamples
cop. (@Darhazer)
RuboCop RSpec v1.28.0
- Add
RSpec/ReceiveNever
cop enforcing usage ofnot_to receive
instead ofnever
matcher. (@Darhazer) - Fix false positive in
RSpec/EmptyLineAfterExampleGroup
cop when example is insideif
. (@Darhazer) - Add
RSpec/MissingExampleGroupArgument
to enforce first argument for an example group. (@geniou) - Drop support for ruby
2.1
. (@bquorning) - Add
FactoryBot/AttributeDefinedStatically
cop to help FactoryBot users with the deprecation of static attributes. (@composerinteralia, @seanpdoyle) - Remove
FactoryBot/DynamicAttributeDefinedStatically
andFactoryBot/StaticAttributeDefinedDynamically
cops. (@composerinteralia)
RuboCop RSpec v1.27.0
RSpec/LeadingSubject
now enforces subject to be before any examples, hooks or let declarations. (@Darhazer)- Fix
RSpec/NotToNot
to highlight only the selector (not_to
orto_not
), so it works also onexpect { ... }
blocks. (@bquorning) - Add
RSpec/EmptyLineAfterHook
cop. (@bquorning) - Add
RSpec/EmptyLineAfterExampleGroup
cop to check that there is an empty line after example group blocks. (@bquorning) - Fix
RSpec/DescribeClass
crashing onRSpec.describe
without arguments. (@Darhazer) - Bump RuboCop requirement to v0.56.0. (@bquorning)
- Fix
RSpec/OverwritingSetup
crashing if a variable is used as an argument forlet
. (@Darhazer)
RuboCop RSpec v1.26.0
- Fix false positive in
RSpec/EmptyExampleGroup
cop when methods named like a RSpec method are used. (@Darhazer) - Fix
Capybara/FeatureMethods
not working when there is require before the spec. (@Darhazer) - Fix
RSpec/EmptyLineAfterFinalLet
: allow a comment to be placed after latest let, requiring empty line after the comment. (@Darhazer) - Add
RSpec/ReceiveCounts
cop to enforce usage of :once and :twice matchers. (@Darhazer)
RuboCop RSpec v1.25.1
RuboCop RSpec v1.25.0
- Add
RSpec/SharedExamples
cop to enforce consistent usage of string to titleize shared examples. (@anthony-robin) - Add
RSpec/Be
cop to enforce passing argument to the genericbe
matcher. (@Darhazer) - Fix false positives in
StaticAttributeDefinedDynamically
andReturnFromStub
when a const is used in an array or hash. (@Darhazer) - Add
RSpec/Pending
cop to enforce no existing pending or skipped examples. This is disabled by default. (@patrickomatic) - Fix
RSpec/NestedGroups
cop support --auto-gen-config. (@walf443) - Fix false positives in
Capybara/FeatureMethods
when feature methods are used as property names in a factory. (@Darhazer) - Allow configuring enabled methods in
Capybara/FeatureMethods
. (@Darhazer) - Add
FactoryBot/CreateList
cop. (@Darhazer)
RuboCop RSpec v1.24.0
- Compatibility with RuboCop v0.53.0. (@bquorning)
- The
Rails/HttpStatus
cop is unavailable if therack
gem cannot be loaded. (@bquorning) - Fix
Rails/HttpStatus
not working with custom HTTP status codes. (@bquorning) - Fix
FactoryBot/StaticAttributeDefinedDynamically
to handle empty block. (@abrom) - Fix false positive in
FactoryBot/DynamicAttributeDefinedStatically
when a before/after callback has a symbol proc argument. (@abrom)
RuboCop RSpec v1.23.0
- Add
RSpec/Rails/HttpStatus
cop to enforce consistent usage of the status format (numeric or symbolic). (@anthony-robin, @jojos003) - Fix false negative in
RSpec/ReturnFromStub
when a constant is being returned by the stub. (@Darhazer) - Fix
FactoryBot/DynamicAttributeDefinedStatically
to handle dynamic attributes inside arrays/hashes. (@abrom) - Add
FactoryBot/StaticAttributeDefinedDynamically
(based on dynamic attribute cop). (@abrom)