Class: TestStringMethods

Inherits:
Minitest::Test
  • Object
show all
Defined in:
lib/object_present.rb

Instance Method Summary collapse

Instance Method Details

#test_blankObject



56
57
58
59
60
61
# File 'lib/object_present.rb', line 56

def test_blank
  assert ''.blank?
  assert ' '.blank?
  assert "\t\n\r".blank?
  refute 'foo'.blank?
end

#test_presentObject



63
64
65
66
# File 'lib/object_present.rb', line 63

def test_present
  assert 'foo'.present?
  refute ''.present?
end