Class: String

Inherits:
Object show all
Defined in:
lib/code-assertions.rb

Instance Method Summary collapse

Instance Method Details

#assert_empty!Object



78
79
80
81
82
# File 'lib/code-assertions.rb', line 78

def assert_empty!
    assert("Expected empty string, `#{self}` instead") { self.size == 0 }
    
    self
end

#assert_not_empty!Object



84
85
86
87
88
# File 'lib/code-assertions.rb', line 84

def assert_not_empty!
    assert("Expected empty string, `#{self}` instead") { self.size > 0 }
    
    self
end