instiki/vendor/rails/activesupport/test/core_ext/blank_test.rb

12 lines
307 B
Ruby
Raw Normal View History

require File.dirname(__FILE__) + '/../abstract_unit'
2007-01-22 14:43:50 +01:00
class BlankTest < Test::Unit::TestCase
BLANK = [nil, false, '', ' ', " \n\t \r ", [], {}]
NOT = [true, 0, 1, 'a', [nil], { nil => 0 }]
def test_blank
BLANK.each { |v| assert v.blank? }
NOT.each { |v| assert !v.blank? }
end
end