Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

# add in a before(:all) in your test suite for example
ls_command = [
"-rw-r--r-- 1 ftp ftp 671686268 Feb 21 03:14 some_file",
"drw-r--r-- 1 ftp ftp 671686268 Feb 21 03:14 directory",
# ...
]
class FakeFtp < OpenStruct
# So that for example fake_ftp.chdir("path/to/dir") will be send as fake_ftp.chdir
def method_missing(method, *args)