diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-03-30 20:53:44 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-30 16:59:48 -0700 |
commit | c10958fbddb22052e7cbe5fe6b825cda3cb26e48 (patch) | |
tree | 8a2da8223cd1f7ffaebc9927163a9f3c4b987958 /activesupport/test | |
parent | 7d0eea179b15c888d8e66654ea7922a9d70831e5 (diff) | |
download | rails-c10958fbddb22052e7cbe5fe6b825cda3cb26e48.tar.gz rails-c10958fbddb22052e7cbe5fe6b825cda3cb26e48.tar.bz2 rails-c10958fbddb22052e7cbe5fe6b825cda3cb26e48.zip |
avoid method redefined; discarding old empty? warning [#4302 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/abstract_unit.rb | 1 | ||||
-rw-r--r-- | activesupport/test/core_ext/blank_test.rb | 8 | ||||
-rw-r--r-- | activesupport/test/empty_bool.rb | 7 | ||||
-rw-r--r-- | activesupport/test/test_test.rb | 8 |
4 files changed, 8 insertions, 16 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index 67f652325e..ea6ebca3ce 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -10,6 +10,7 @@ $:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) require 'test/unit' require 'active_support/core_ext/kernel/reporting' +require 'empty_bool' silence_warnings { require 'mocha' } diff --git a/activesupport/test/core_ext/blank_test.rb b/activesupport/test/core_ext/blank_test.rb index ed6c625a0a..97c6b213ba 100644 --- a/activesupport/test/core_ext/blank_test.rb +++ b/activesupport/test/core_ext/blank_test.rb @@ -1,14 +1,6 @@ require 'abstract_unit' require 'active_support/core_ext/object/blank' -class EmptyTrue - def empty?() true; end -end - -class EmptyFalse - def empty?() false; end -end - class BlankTest < Test::Unit::TestCase 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 new file mode 100644 index 0000000000..005b3523ef --- /dev/null +++ b/activesupport/test/empty_bool.rb @@ -0,0 +1,7 @@ +class EmptyTrue + def empty?() true; end +end + +class EmptyFalse + def empty?() false; end +end diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index f9482c8e90..3092fe01ae 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -86,14 +86,6 @@ class AssertDifferenceTest < ActiveSupport::TestCase end end -class EmptyTrue - def empty?() true; end -end - -class EmptyFalse - def empty?() false; end -end - class AssertBlankTest < ActiveSupport::TestCase BLANK = [ EmptyTrue.new, nil, false, '', ' ', " \n\t \r ", [], {} ] NOT_BLANK = [ EmptyFalse.new, Object.new, true, 0, 1, 'x', [nil], { nil => 0 } ] |