From 762e3f05f3d372cb32570db0deeef27232c4dd00 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 7 Aug 2016 17:50:59 +0900 Subject: Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty lines --- activesupport/test/callbacks_test.rb | 4 ---- activesupport/test/core_ext/hash_ext_test.rb | 1 - activesupport/test/core_ext/load_error_test.rb | 1 - activesupport/test/core_ext/module_test.rb | 1 - activesupport/test/core_ext/numeric_ext_test.rb | 2 -- activesupport/test/dependencies_test.rb | 1 - activesupport/test/deprecation_test.rb | 1 - activesupport/test/file_update_checker_shared_tests.rb | 2 -- activesupport/test/inflector_test.rb | 1 - activesupport/test/json/encoding_test.rb | 1 - activesupport/test/multibyte_unicode_database_test.rb | 1 - activesupport/test/rescuable_test.rb | 1 - activesupport/test/xml_mini/jdom_engine_test.rb | 2 -- activesupport/test/xml_mini/libxml_engine_test.rb | 1 - 14 files changed, 20 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/callbacks_test.rb b/activesupport/test/callbacks_test.rb index 040e9c1cca..69b15b0086 100644 --- a/activesupport/test/callbacks_test.rb +++ b/activesupport/test/callbacks_test.rb @@ -181,8 +181,6 @@ module CallbacksTest end end - - class ConditionalPerson < Record # proc before_save Proc.new { |r| r.history << [:before_save, :proc] }, if: Proc.new { |r| true } @@ -489,8 +487,6 @@ module CallbacksTest end end - - class ResetCallbackTest < ActiveSupport::TestCase def test_save_conditional_person person = CleanPerson.new diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index 8a9f33ae53..6a65f999fd 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -276,7 +276,6 @@ class HashExtTest < ActiveSupport::TestCase assert_equal @nested_symbols, @nested_mixed.with_indifferent_access.deep_symbolize_keys end - def test_symbolize_keys_bang_for_hash_with_indifferent_access assert_raise(NoMethodError) { @symbols.with_indifferent_access.dup.symbolize_keys! } assert_raise(NoMethodError) { @strings.with_indifferent_access.dup.symbolize_keys! } diff --git a/activesupport/test/core_ext/load_error_test.rb b/activesupport/test/core_ext/load_error_test.rb index 4ed83c3415..b50a35b2cb 100644 --- a/activesupport/test/core_ext/load_error_test.rb +++ b/activesupport/test/core_ext/load_error_test.rb @@ -1,7 +1,6 @@ require "abstract_unit" require "active_support/core_ext/load_error" - class TestMissingSourceFile < ActiveSupport::TestCase def test_it_is_deprecated assert_deprecated do diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb index bfe60e0f5f..104082b777 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -509,7 +509,6 @@ class MethodAliasingTest < ActiveSupport::TestCase assert_respond_to @instance, :quux_with_baz? assert_respond_to @instance, :quux_with_baz= - FooClassWithBarMethod.alias_method_chain :quux!, :baz assert_equal "quux!_with_baz", @instance.quux! assert_equal "quux!", @instance.quux_without_baz! diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb index fc93a18ab1..b99217a1b3 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -176,7 +176,6 @@ class NumericExtFormattingTest < ActiveSupport::TestCase assert_equal("£1234567890,50", 1234567890.50.to_s(:currency, unit: "£", separator: ",", delimiter: "")) end - def test_to_s__rounded assert_equal("-111.235", -111.2346.to_s(:rounded)) assert_equal("111.235", 111.2346.to_s(:rounded)) @@ -222,7 +221,6 @@ class NumericExtFormattingTest < ActiveSupport::TestCase assert_equal "12.345.678,05", 12345678.05.to_s(:delimited, delimiter: ".", separator: ",") end - def test_to_s__rounded_with_custom_delimiter_and_separator assert_equal "31,83", 31.825.to_s(:rounded, precision: 2, separator: ",") assert_equal "1.231,83", 1231.825.to_s(:rounded, precision: 2, separator: ",", delimiter: ".") diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 1ee4d7f63c..1ed6337fca 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -1036,7 +1036,6 @@ class DependenciesTest < ActiveSupport::TestCase remove_constants(:A) end - def test_autoload_once_paths_should_behave_when_recursively_loading old_path = ActiveSupport::Dependencies.autoload_once_paths with_loading "dependencies", "autoloading_fixtures" do diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb index 36c3a44c31..6669a70a00 100644 --- a/activesupport/test/deprecation_test.rb +++ b/activesupport/test/deprecation_test.rb @@ -35,7 +35,6 @@ class Deprecatee A = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("Deprecatee::A", "Deprecatee::B::C") end - class DeprecationTest < ActiveSupport::TestCase include ActiveSupport::Testing::Stream diff --git a/activesupport/test/file_update_checker_shared_tests.rb b/activesupport/test/file_update_checker_shared_tests.rb index a749c1947c..cd6a58e840 100644 --- a/activesupport/test/file_update_checker_shared_tests.rb +++ b/activesupport/test/file_update_checker_shared_tests.rb @@ -80,7 +80,6 @@ module FileUpdateCheckerSharedTests assert_equal 1, i end - test "updated should become true when watched files are created" do i = 0 @@ -92,7 +91,6 @@ module FileUpdateCheckerSharedTests assert checker.updated? end - test "updated should become true when watched files are modified" do i = 0 diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index f0b7dda682..39e8c611e5 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -80,7 +80,6 @@ class InflectorTest < ActiveSupport::TestCase end end - def test_overwrite_previous_inflectors assert_equal("series", ActiveSupport::Inflector.singularize("series")) ActiveSupport::Inflector.inflections.singular "series", "serie" diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index 4a9ed22951..9c95bf35b8 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -306,7 +306,6 @@ class TestJSONEncoding < ActiveSupport::TestCase user_birthday = Struct::UserNameAndDate.new "David", Date.new(2010, 01, 01) custom = Struct::Custom.new "David", user_birthday - json_strings = "" json_string_and_date = "" json_custom = "" diff --git a/activesupport/test/multibyte_unicode_database_test.rb b/activesupport/test/multibyte_unicode_database_test.rb index 924db303b6..3724782930 100644 --- a/activesupport/test/multibyte_unicode_database_test.rb +++ b/activesupport/test/multibyte_unicode_database_test.rb @@ -1,6 +1,5 @@ require "abstract_unit" - class MultibyteUnicodeDatabaseTest < ActiveSupport::TestCase include ActiveSupport::Multibyte::Unicode diff --git a/activesupport/test/rescuable_test.rb b/activesupport/test/rescuable_test.rb index 283afca642..7e5c3d1a8f 100644 --- a/activesupport/test/rescuable_test.rb +++ b/activesupport/test/rescuable_test.rb @@ -97,7 +97,6 @@ class CoolStargate < Stargate end end - class RescuableTest < ActiveSupport::TestCase def setup @stargate = Stargate.new diff --git a/activesupport/test/xml_mini/jdom_engine_test.rb b/activesupport/test/xml_mini/jdom_engine_test.rb index 43edd49663..a776ad25c4 100644 --- a/activesupport/test/xml_mini/jdom_engine_test.rb +++ b/activesupport/test/xml_mini/jdom_engine_test.rb @@ -3,7 +3,6 @@ if RUBY_PLATFORM.include?("java") require "active_support/xml_mini" require "active_support/core_ext/hash/conversions" - class JDOMEngineTest < ActiveSupport::TestCase include ActiveSupport @@ -56,7 +55,6 @@ if RUBY_PLATFORM.include?("java") end end - def test_not_allowed_to_load_external_doctypes attack_xml = <<-EOT diff --git a/activesupport/test/xml_mini/libxml_engine_test.rb b/activesupport/test/xml_mini/libxml_engine_test.rb index d5fd17d06e..81b0d3c407 100644 --- a/activesupport/test/xml_mini/libxml_engine_test.rb +++ b/activesupport/test/xml_mini/libxml_engine_test.rb @@ -191,7 +191,6 @@ else eoxml end - private def assert_equal_rexml(xml) parsed_xml = XmlMini.parse(xml) -- cgit v1.2.3