spec/lib/bolt_spec/files.rb
# Stubs a path so it looks like a nonexistent file.
#
# @param path [String] The path to the nonexistent file.
#
Stubs a path so it looks like a nonexistent file.
Stubs a path so it looks like a nonexistent file .
def stub_nonexistent_file(path)
      allow(Bolt::Util).to receive(:file_stat).with(path).and_raise(
        Errno::ENOENT, "No such file or directory @ rb_file_s_stat - #{path}"
      )
      nil
    end
def stub_nonexistent_file ( path ) allow ( Bolt :: Util ) . to receive ( :file_stat ) . with ( path ) . and_raise ( Errno :: ENOENT , "No such file or directory @ rb_file_s_stat - #{path}" ) nil end
Stubs a path so it looks like a nonexistent file.
Stubs a path so it looks like a nonexistent file .
path
The path to the nonexistent file.
The path to the nonexistent file .