Class: File
Instance Method Summary collapse
Instance Method Details
#assert_exist! ⇒ Object
64 65 66 67 68 |
# File 'lib/code-assertions.rb', line 64 def assert_exist! assert("The specified file should exist: `#{self.path}`.") { FileTest.exist?(self.path) } self end |
#assert_not_exist!(filename) ⇒ Object
70 71 72 73 74 |
# File 'lib/code-assertions.rb', line 70 def assert_not_exist!(filename) assert("The specified file should not exist: `#{self.path}`.") { !FileTest.exist?(self.path) } self end |