Skip to content

Latest commit

 

History

History
96 lines (82 loc) · 6.57 KB

CHANGELOG.md

File metadata and controls

96 lines (82 loc) · 6.57 KB

Changelog

Master (Unreleased)

  • Fix a false positive for FactoryBot/FactoryNameStyle when namespaced models. (@ydah)

2.24.0 (2023-09-18)

  • Fix FactoryBot/AssociationStyle cop to ignore explicit associations with strategy: :build. (@pirj)
  • Change FactoryBot/CreateList so that it is not an offense if not repeated multiple times. (@ydah)
  • Fix a false positive for FactoryBot/AssociationStyle when association is called in trait block and column name is keyword. (@ydah)
  • Fix a false positive for FactoryBot/AssociationStyle when EnforcedStyle: Explicit and using trait within trait. (@ydah)
  • Change FactoryBot/AssociationStyle, FactoryBot/AttributeDefinedStatically, FactoryBot/CreateList and FactoryBot/FactoryClassName to work with minitest style directory. (@ydah)
  • Add FactoryBot/IdSequence cop. (@owst)

2.23.1 (2023-05-15)

  • Fix FactoryBot/AssociationStyle cop for a blockless factory. (@pirj)

2.23.0 (2023-05-15)

  • Add FactoryBot/FactoryAssociationWithStrategy cop. (@morissetcl)
  • Mark FactoryBot/CreateList as SafeAutoCorrect: false. (@r7kamura)
  • Change FactoryBot/CreateList so that it considers times.map. (@r7kamura)
  • Add FactoryBot/RedundantFactoryOption cop. (@r7kamura)
  • Add ExplicitOnly configuration option to FactoryBot/ConsistentParenthesesStyle, FactoryBot/CreateList and FactoryBot/FactoryNameStyle. (@ydah)
  • Change FactoryBot/CreateList so that it checks same factory calls in an Array. (@r7kamura)
  • Add FactoryBot/AssociationStyle cop. (@r7kamura)

2.22.0 (2023-05-04)

  • Extracted from rubocop-rspec into a separate repository for easier use with Minitest/Cucumber. (@ydah)

Previously (see rubocop-rspec's changelist for details)

  • Fix a false positive for RSpec/FactoryBot/ConsistentParenthesesStyle inside &&, || and :? when omit_parentheses is on. (@dmitrytsepelev)
  • Add new RSpec/FactoryBot/FactoryNameStyle cop. (@ydah)
  • Fix wrong autocorrection in n_times style on RSpec/FactoryBot/CreateList. (@r7kamura)
  • Fix a false positive for RSpec/FactoryBot/ConsistentParenthesesStyle when using generate with multiple arguments. (@ydah)
  • Fix RSpec/FactoryBot/ConsistentParenthesesStyle to ignore calls without the first positional argument. (@pirj)
  • Fix RSpec/FactoryBot/ConsistentParenthesesStyle to ignore calls inside a Hash or an Array. (@pirj)
  • Fix an incorrect autocorrect for FactoryBot/ConsistentParenthesesStyle with omit_parentheses option when method name and first argument are not on same line. (@ydah)
  • Add RSpec/FactoryBot/ConsistentParenthesesStyle cop. (@Liberatys)
  • Support Array.new(n) on RSpec/FactoryBot/CreateList cop. (@r7kamura)
  • Fixed false offense detection in FactoryBot/CreateList when a n.times block is including method calls in the factory create arguments. (@ngouy)
  • Fix error in RSpec/RSpec/FactoryBot/CreateList cop for empty block. (@tejasbubane)
  • Fix RSpec/FactoryBot/SyntaxMethods and RSpec/Capybara/FeatureMethods to inspect shared groups. (@pirj)
  • Add new RSpec/FactoryBot/SyntaxMethods cop. (@leoarnold)
  • Change namespace of several cops (Capybara/* -> RSpec/Capybara/*, FactoryBot/* -> RSpec/FactoryBot/*, Rails/* -> RSpec/Rails/*). (@pirj, @bquorning)
  • Fix FactoryBot/AttributeDefinedStatically to allow #traits_for_enum without a block. (@harrylewis)
  • Improve the performance of FactoryBot/AttributeDefinedStatically, RSpec/InstanceVariable, RSpec/LetSetup, RSpec/NestedGroups and RSpec/ReturnFromStub. (@andrykonchin)
  • Improve message and description of FactoryBot/FactoryClassName. (@ybiquitous)
  • Fix FactoryBot/FactoryClassName to ignore Hash and OpenStruct. (@jfragoulis)
  • Add FactoryBot/FactoryClassName cop. (@jfragoulis)
  • Fix FactoryBot/AttributeDefinedStatically not working with an explicit receiver. (@composerinteralia)
  • Fix FactoryBot/CreateList autocorrect crashing when the factory is called with a block=. (@Darhazer)
  • FactoryBot/CreateList now ignores times blocks with an argument. (@Darhazer)
  • Fix FactoryBot/AttributeDefinedStatically not working when there is a non-symbol key. (@vzvu3k6k)
  • 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)
  • Add FactoryBot/AttributeDefinedStatically cop to help FactoryBot users with the deprecation of static attributes. (@composerinteralia, @seanpdoyle)
  • Remove FactoryBot/DynamicAttributeDefinedStatically and FactoryBot/StaticAttributeDefinedDynamically cops. (@composerinteralia)
  • Fix FactoryBot/DynamicAttributeDefinedStatically false positive when using symbol proc argument for a sequence. (@tdeo)
  • Add FactoryBot/CreateList cop. (@Darhazer)
  • 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)
  • Fix FactoryBot/DynamicAttributeDefinedStatically to handle dynamic attributes inside arrays/hashes. (@abrom)
  • Add FactoryBot/StaticAttributeDefinedDynamically (based on dynamic attribute cop). (@abrom)
  • Rename namespace FactoryGirl to FactoryBot following original library update. (@walf443)
  • Add RSpec/FactoryGirl namespace including the first cop for factories: FactoryGirl/DynamicAttributeDefinedStatically. (@jonatas)