Skip to content

Commit

Permalink
avoid method redefined; discarding old empty? warning [#4302 state:co…
Browse files Browse the repository at this point in the history
…mmitted]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
spastorino authored and jeremy committed Mar 30, 2010
1 parent 7d0eea1 commit c10958f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
1 change: 1 addition & 0 deletions activesupport/test/abstract_unit.rb
Expand Up @@ -10,6 +10,7 @@

require 'test/unit'
require 'active_support/core_ext/kernel/reporting'
require 'empty_bool'

silence_warnings { require 'mocha' }

Expand Down
8 changes: 0 additions & 8 deletions 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 } ]
Expand Down
7 changes: 7 additions & 0 deletions activesupport/test/empty_bool.rb
@@ -0,0 +1,7 @@
class EmptyTrue
def empty?() true; end
end

class EmptyFalse
def empty?() false; end
end
8 changes: 0 additions & 8 deletions activesupport/test/test_test.rb
Expand Up @@ -86,14 +86,6 @@ def default_test; end
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 } ]
Expand Down

0 comments on commit c10958f

Please sign in to comment.