Add Style/EmptyLinesAroundMethodBody
in .rubocop.yml
and remove extra empty lines
This commit is contained in:
parent
4fed08fa78
commit
16ee3ccc9c
@ -33,6 +33,10 @@ Style/EmptyLines:
|
||||
Style/EmptyLinesAroundClassBody:
|
||||
Enabled: true
|
||||
|
||||
# In a regular method definition, no empty lines around the body.
|
||||
Style/EmptyLinesAroundMethodBody:
|
||||
Enabled: true
|
||||
|
||||
# In a regular module definition, no empty lines around the body.
|
||||
Style/EmptyLinesAroundModuleBody:
|
||||
Enabled: true
|
||||
|
@ -810,7 +810,6 @@ def test_test_uploaded_file
|
||||
new_content_type = "new content_type"
|
||||
file.content_type = new_content_type
|
||||
assert_equal new_content_type, file.content_type
|
||||
|
||||
end
|
||||
|
||||
def test_fixture_path_is_accessed_from_self_instead_of_active_support_test_case
|
||||
|
@ -161,6 +161,5 @@ def reloader(check = lambda { true })
|
||||
reloader.check = check
|
||||
reloader
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -4,7 +4,6 @@ class RunnerTest < ActiveSupport::TestCase
|
||||
test "runner preserves the setting of integration_session" do
|
||||
runner = Class.new do
|
||||
def before_setup
|
||||
|
||||
end
|
||||
end.new
|
||||
|
||||
|
@ -1407,7 +1407,6 @@ def test_select_datetime_with_default_prompt
|
||||
end
|
||||
|
||||
def test_select_datetime_with_custom_prompt
|
||||
|
||||
expected = %(<select id="date_first_year" name="date[first][year]">\n)
|
||||
expected << %(<option value="">Choose year</option>\n<option value="2003" selected="selected">2003</option>\n<option value="2004">2004</option>\n<option value="2005">2005</option>\n)
|
||||
expected << "</select>\n"
|
||||
|
@ -767,7 +767,6 @@ def test_check_box_with_multiple_behavior_and_index
|
||||
'<input name="post[bar][comment_ids][]" type="hidden" value="0" /><input checked="checked" id="post_bar_comment_ids_3" name="post[bar][comment_ids][]" type="checkbox" value="3" />',
|
||||
check_box("post", "comment_ids", { multiple: true, index: "bar" }, 3)
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
def test_checkbox_disabled_disables_hidden_field
|
||||
|
@ -347,7 +347,6 @@ def test_find_with_uuid
|
||||
assert_raise ActiveRecord::RecordNotFound do
|
||||
UuidPost.find(123456)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def test_find_by_with_uuid
|
||||
|
@ -3,7 +3,6 @@
|
||||
class SQLite3StatementPoolTest < ActiveRecord::SQLite3TestCase
|
||||
if Process.respond_to?(:fork)
|
||||
def test_cache_is_per_pid
|
||||
|
||||
cache = ActiveRecord::ConnectionAdapters::SQLite3Adapter::StatementPool.new(10)
|
||||
cache["foo"] = "bar"
|
||||
assert_equal "bar", cache["foo"]
|
||||
|
@ -883,7 +883,6 @@ def test_collection_singular_ids_setter_with_string_primary_keys
|
||||
book.subscriber_ids = []
|
||||
assert_equal [], book.subscribers.reload
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def test_collection_singular_ids_setter_with_changed_primary_key
|
||||
|
@ -552,7 +552,6 @@ def test_file_search_uses_first_in_load_path
|
||||
|
||||
assert_equal autoload + "/conflict.rb", ActiveSupport::Dependencies.search_for_file("conflict")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def test_custom_const_missing_should_work
|
||||
|
@ -664,7 +664,6 @@ def test_should_compute_grapheme_length
|
||||
end
|
||||
|
||||
def test_tidy_bytes_should_tidy_bytes
|
||||
|
||||
single_byte_cases = {
|
||||
"\x21" => "!", # Valid ASCII byte, low
|
||||
"\x41" => "A", # Valid ASCII byte, mid
|
||||
|
@ -661,7 +661,6 @@ def has_migrations?
|
||||
end
|
||||
|
||||
def self.find_root_with_flag(flag, root_path, default = nil) #:nodoc:
|
||||
|
||||
while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/#{flag}")
|
||||
parent = File.dirname(root_path)
|
||||
root_path = parent != root_path && parent
|
||||
|
Loading…
Reference in New Issue
Block a user