From 59b7203180edd2424f4b78fc934e92cff0d391fa Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 11 Dec 2013 20:36:29 -0200 Subject: Remove not necessary file, move constants to the file they are used File 'empty_bool.rb' was introduced around 4 years ago in c10958fbddb22052e7cbe5fe6b825cda3cb26e48 to remove method redefined warning in AS test suite, however we do not have such need for reuse anymore, so we can safely move the constants back to the file where they are currently used and get rid of the extra file/require. --- activesupport/test/abstract_unit.rb | 1 - activesupport/test/core_ext/blank_test.rb | 8 ++++++++ activesupport/test/empty_bool.rb | 7 ------- 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 activesupport/test/empty_bool.rb (limited to 'activesupport') diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index 65de48a7f6..4600855998 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -15,7 +15,6 @@ silence_warnings do end require 'active_support/testing/autorun' -require 'empty_bool' ENV['NO_RELOAD'] = '1' require 'active_support' diff --git a/activesupport/test/core_ext/blank_test.rb b/activesupport/test/core_ext/blank_test.rb index a68c074777..3e3176f993 100644 --- a/activesupport/test/core_ext/blank_test.rb +++ b/activesupport/test/core_ext/blank_test.rb @@ -4,6 +4,14 @@ require 'abstract_unit' require 'active_support/core_ext/object/blank' class BlankTest < ActiveSupport::TestCase + class EmptyTrue + def empty?() true; end + end + + class EmptyFalse + def empty?() false; end + end + BLANK = [ EmptyTrue.new, nil, false, '', ' ', " \n\t \r ", ' ', [], {} ] NOT = [ EmptyFalse.new, Object.new, true, 0, 1, 'a', [nil], { nil => 0 } ] diff --git a/activesupport/test/empty_bool.rb b/activesupport/test/empty_bool.rb deleted file mode 100644 index 005b3523ef..0000000000 --- a/activesupport/test/empty_bool.rb +++ /dev/null @@ -1,7 +0,0 @@ -class EmptyTrue - def empty?() true; end -end - -class EmptyFalse - def empty?() false; end -end -- cgit v1.2.3