Sha256: e923a7836368e9c0fc23857e37d8a1501b0a0d6e2447d16c5d4a672fa8b60cf3

Contents?: true

Size: 307 Bytes

Versions: 61

Compression:

Stored size: 307 Bytes

Contents

require File.dirname(__FILE__) + '/../abstract_unit'

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

Version data entries

61 entries across 61 versions & 2 rubygems

Version Path
backlog-0.0.0 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.0.1 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.0.2 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.0.4 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.0.5 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.1.1 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.1.0 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.1.2 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.2.0 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.2.1 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.0 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.1 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.2 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.3 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.4 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.6 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.5 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.7 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.8 vendor/rails/activesupport/test/core_ext/blank_test.rb
backlog-0.3.9 vendor/rails/activesupport/test/core_ext/blank_test.rb