Commit 8119f082 authored by Robert Speicher's avatar Robert Speicher

Rename AddColumnWithDefault to ReversibleAddColumnWithDefault

We're going to add another cop that deals with another aspect of
`add_column_with_default`, so we need to separate them.
parent 94d2ffbe
......@@ -5,7 +5,7 @@ module RuboCop
module Migration
# Cop that checks if `add_column_with_default` is used with `up`/`down` methods
# and not `change`.
class AddColumnWithDefault < RuboCop::Cop::Cop
class ReversibleAddColumnWithDefault < RuboCop::Cop::Cop
include MigrationHelpers
def_node_matcher :add_column_with_default?, <<~PATTERN
......
require_relative 'cop/custom_error_class'
require_relative 'cop/gem_fetcher'
require_relative 'cop/migration/add_column'
require_relative 'cop/migration/add_column_with_default'
require_relative 'cop/migration/add_concurrent_foreign_key'
require_relative 'cop/migration/add_concurrent_index'
require_relative 'cop/migration/add_index'
require_relative 'cop/migration/remove_concurrent_index'
require_relative 'cop/migration/remove_index'
require_relative 'cop/migration/reversible_add_column_with_default'
......@@ -3,9 +3,9 @@ require 'spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/migration/add_column_with_default'
require_relative '../../../../rubocop/cop/migration/reversible_add_column_with_default'
describe RuboCop::Cop::Migration::AddColumnWithDefault do
describe RuboCop::Cop::Migration::ReversibleAddColumnWithDefault do
include CopHelper
subject(:cop) { described_class.new }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment