Support `mkdir' status attributes
This commit is contained in:
@@ -86,18 +86,12 @@ module Producer::Core
|
||||
end
|
||||
|
||||
describe '#mkdir' do
|
||||
let(:path) { 'some_directory_path' }
|
||||
let(:path) { 'some_directory_path' }
|
||||
let(:attributes) { { foo: :bar } }
|
||||
|
||||
it 'creates the directory' do
|
||||
expect(sftp).to receive(:mkdir!).with(path, anything)
|
||||
fs.mkdir path
|
||||
end
|
||||
|
||||
it 'specifies permissions from optional mode argument' do
|
||||
expect(sftp).to receive(:mkdir!) do |_, options|
|
||||
expect(options[:permissions]).to eq 0700
|
||||
end
|
||||
fs.mkdir path, 0700
|
||||
expect(sftp).to receive(:mkdir!).with(path, attributes)
|
||||
fs.mkdir path, attributes
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user