Class: String

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

Instance Method Summary collapse

Instance Method Details

#assert_empty!Object



59
60
61
# File 'lib/code-assertions.rb', line 59

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

#assert_not_empty!Object



63
64
65
# File 'lib/code-assertions.rb', line 63

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