aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-06-12 21:30:49 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-06-13 12:00:45 +0900
commitc81af6ae723ccfcd601032167d7b7f57c5449c33 (patch)
tree369ad39022751cf1ce7ed5b9f80358e80cbcdd2e /railties/test/generators
parent0ad238f4782375ea2d3e0145c74be1d1aa8f546f (diff)
downloadrails-c81af6ae723ccfcd601032167d7b7f57c5449c33.tar.gz
rails-c81af6ae723ccfcd601032167d7b7f57c5449c33.tar.bz2
rails-c81af6ae723ccfcd601032167d7b7f57c5449c33.zip
Enable `Layout/EmptyLinesAroundAccessModifier` cop
We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/actions_test.rb1
-rw-r--r--railties/test/generators/api_app_generator_test.rb1
-rw-r--r--railties/test/generators/migration_generator_test.rb1
-rw-r--r--railties/test/generators/named_base_test.rb1
-rw-r--r--railties/test/generators/plugin_generator_test.rb1
5 files changed, 0 insertions, 5 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb
index d913bb5438..150836d4ce 100644
--- a/railties/test/generators/actions_test.rb
+++ b/railties/test/generators/actions_test.rb
@@ -505,7 +505,6 @@ F
end
private
-
def action(*args, &block)
capture(:stdout) { generator.send(*args, &block) }
end
diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb
index d03178da66..099bad8fb9 100644
--- a/railties/test/generators/api_app_generator_test.rb
+++ b/railties/test/generators/api_app_generator_test.rb
@@ -109,7 +109,6 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase
end
private
-
def default_files
%w(.gitignore
.ruby-version
diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb
index 65cde91436..080e54a1ca 100644
--- a/railties/test/generators/migration_generator_test.rb
+++ b/railties/test/generators/migration_generator_test.rb
@@ -445,7 +445,6 @@ class MigrationGeneratorTest < Rails::Generators::TestCase
end
private
-
def with_singular_table_name
old_state = ActiveRecord::Base.pluralize_table_names
ActiveRecord::Base.pluralize_table_names = false
diff --git a/railties/test/generators/named_base_test.rb b/railties/test/generators/named_base_test.rb
index 4e61b660d7..1b45c58b0e 100644
--- a/railties/test/generators/named_base_test.rb
+++ b/railties/test/generators/named_base_test.rb
@@ -169,7 +169,6 @@ class NamedBaseTest < Rails::Generators::TestCase
end
private
-
def assert_name(generator, value, method)
assert_equal value, generator.send(method)
end
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb
index f45464f8d0..db774f6ac1 100644
--- a/railties/test/generators/plugin_generator_test.rb
+++ b/railties/test/generators/plugin_generator_test.rb
@@ -713,7 +713,6 @@ class PluginGeneratorTest < Rails::Generators::TestCase
end
private
-
def action(*args, &block)
silence(:stdout) { generator.send(*args, &block) }
end