spec/lib/bolt_spec/files.rb
# Stubs a path so it looks like a directory.
#
# @param path [String] The path to the directory.
#
Stubs a path so it looks like a directory.
Stubs a path so it looks like a directory .
def stub_directory(path)
      double('stat', readable?: true, file?: false, directory?: true).tap do |double|
        allow(Bolt::Util).to receive(:file_stat).with(path).and_return(double)
      end
    end
def stub_directory ( path ) double ( 'stat' , readable? : true , file? : false , directory? : true ) . tap do | double | allow ( Bolt :: Util ) . to receive ( :file_stat ) . with ( path ) . and_return ( double ) end end
Stubs a path so it looks like a directory.
Stubs a path so it looks like a directory .
path
The path to the directory.
The path to the directory .