diff options
Diffstat (limited to 'rubocop/cop/rspec/factories_in_migration_specs.rb')
-rw-r--r-- | rubocop/cop/rspec/factories_in_migration_specs.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/rspec/factories_in_migration_specs.rb b/rubocop/cop/rspec/factories_in_migration_specs.rb index f29bbf68cdc..6dde3d4524c 100644 --- a/rubocop/cop/rspec/factories_in_migration_specs.rb +++ b/rubocop/cop/rspec/factories_in_migration_specs.rb @@ -13,7 +13,7 @@ module RuboCop # # good # let(:users) { table(:users) } # let(:user) { users.create!(name: 'User 1', username: 'user1') } - class FactoriesInMigrationSpecs < RuboCop::Cop::Cop + class FactoriesInMigrationSpecs < RuboCop::Cop::Base MESSAGE = "Don't use FactoryBot.%s in migration specs, use `table` instead." FORBIDDEN_METHODS = %i[build build_list create create_list attributes_for].freeze @@ -29,7 +29,7 @@ module RuboCop method = node.children[1] - add_offense(node, location: :expression, message: MESSAGE % method) + add_offense(node, message: MESSAGE % method) end end end |