class String

Public Instance Methods

assert_empty!() click to toggle source
# File lib/code-assertions.rb, line 78
def assert_empty!
    assert("Expected empty string, `#{self}` instead") { self.size == 0 }
    
    self
end
assert_not_empty!() click to toggle source
# File lib/code-assertions.rb, line 84
def assert_not_empty!
    assert("Expected empty string, `#{self}` instead") { self.size > 0 }
    
    self
end