From 9be1e67cd232daa4c0d3a7a5e181816463b919a4 Mon Sep 17 00:00:00 2001 From: Mark Chavez Date: Wed, 28 Aug 2019 10:54:06 +0800 Subject: [PATCH] Rename migration filename so it reads like an action/verb --- .../active_record/two_factor_authentication_generator.rb | 2 +- .../active_record/two_factor_authentication_generator_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/generators/active_record/two_factor_authentication_generator.rb b/lib/generators/active_record/two_factor_authentication_generator.rb index 36567771..84d898ee 100644 --- a/lib/generators/active_record/two_factor_authentication_generator.rb +++ b/lib/generators/active_record/two_factor_authentication_generator.rb @@ -6,7 +6,7 @@ class TwoFactorAuthenticationGenerator < ActiveRecord::Generators::Base source_root File.expand_path("../templates", __FILE__) def copy_two_factor_authentication_migration - migration_template "migration.rb", "db/migrate/two_factor_authentication_add_to_#{table_name}.rb" + migration_template "migration.rb", "db/migrate/add_two_factor_authentication_to_#{table_name}.rb" end end diff --git a/spec/generators/active_record/two_factor_authentication_generator_spec.rb b/spec/generators/active_record/two_factor_authentication_generator_spec.rb index 5a8989d0..2f61b9c2 100644 --- a/spec/generators/active_record/two_factor_authentication_generator_spec.rb +++ b/spec/generators/active_record/two_factor_authentication_generator_spec.rb @@ -21,7 +21,7 @@ end describe 'the migration' do - subject { migration_file('db/migrate/two_factor_authentication_add_to_users.rb') } + subject { migration_file('db/migrate/add_two_factor_authentication_to_users.rb') } it { is_expected.to exist } it { is_expected.to be_a_migration }