Skip to content

Releases: rubocop/rubocop-rspec

RuboCop RSpec v1.30.0

08 Oct 06:48
b211df9
Compare
Choose a tag to compare
  • 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 when is_expected is used inside its() block. (@Darhazer)
  • Add single_statement_only style to RSpec/ImplicitSubject as a more relaxed alternative to single_line_only. (@Darhazer)
  • Add RSpec/UnspecifiedException as a default cop to encourage more-specific expect{}.to raise_error(ExceptionType), or raise_exception style handling of exceptions. (@daveworth)

RuboCop RSpec v1.29.1

01 Sep 17:30
66279c1
Compare
Choose a tag to compare
  • Fix false negative in FactoryBot/AttributeDefinedStatically when attribute is defined on self. (@Darhazer)
  • RSpec/FactoryBot cops will now also inspect the spec/factories.rb path by default. (@bquorning)

RuboCop RSpec v1.29.0

25 Aug 12:19
a94aa6b
Compare
Choose a tag to compare
  • RSpec/InstanceVariable - Recommend local variables in addition to let. (@jaredbeck)
  • Add RSpec/ImplicitSubject cop. (@Darhazer)
  • Add RSpec/HooksBeforeExamples cop. (@Darhazer)

RuboCop RSpec v1.28.0

14 Aug 14:07
75d5fe7
Compare
Choose a tag to compare
  • Add RSpec/ReceiveNever cop enforcing usage of not_to receive instead of never matcher. (@Darhazer)
  • Fix false positive in RSpec/EmptyLineAfterExampleGroup cop when example is inside if. (@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 and FactoryBot/StaticAttributeDefinedDynamically cops. (@composerinteralia)

RuboCop RSpec v1.27.0

14 Jun 13:44
7193d83
Compare
Choose a tag to compare
  • 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 or to_not), so it works also on expect { ... } 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 on RSpec.describe without arguments. (@Darhazer)
  • Bump RuboCop requirement to v0.56.0. (@bquorning)
  • Fix RSpec/OverwritingSetup crashing if a variable is used as an argument for let. (@Darhazer)

RuboCop RSpec v1.26.0

06 Jun 09:06
3eaed7b
Compare
Choose a tag to compare
  • 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

10 Apr 18:16
1a6af99
Compare
Choose a tag to compare
  • Fix false positive in RSpec/Pending cop when pending is used as a method name. (@Darhazer)
  • Fix FactoryBot/DynamicAttributeDefinedStatically false positive when using symbol proc argument for a sequence. (@tdeo)

RuboCop RSpec v1.25.0

07 Apr 12:04
f06e22a
Compare
Choose a tag to compare
  • 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 generic be matcher. (@Darhazer)
  • Fix false positives in StaticAttributeDefinedDynamically and ReturnFromStub 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

06 Mar 10:19
e51fc4a
Compare
Choose a tag to compare
  • Compatibility with RuboCop v0.53.0. (@bquorning)
  • The Rails/HttpStatus cop is unavailable if the rack 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

23 Feb 13:20
57dd28d
Compare
Choose a tag to compare
  • 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)