Class: File

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

Instance Method Summary collapse

Instance Method Details

#assert_exist!Object



49
50
51
# File 'lib/code-assertions.rb', line 49

def assert_exist!
    assert("The specified file should exist: `#{self.path}`.") { FileTest.exist?(self.path) }
end

#assert_not_exist!(filename) ⇒ Object



53
54
55
# File 'lib/code-assertions.rb', line 53

def assert_not_exist!(filename)
    assert("The specified file should not exist: `#{self.path}`.") { !FileTest.exist?(self.path) }
end