Refactor mkdir action
This commit is contained in:
parent
b11d0b6950
commit
429b9f9ad2
@ -15,6 +15,9 @@ module Producer
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def path
|
||||
arguments.first
|
||||
end
|
||||
|
@ -23,26 +23,6 @@ module Producer::Core
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#path' do
|
||||
it 'returns the path' do
|
||||
expect(mkdir.path).to eq path
|
||||
end
|
||||
end
|
||||
|
||||
describe '#mode' do
|
||||
it 'returns nil' do
|
||||
expect(mkdir.mode).to be nil
|
||||
end
|
||||
|
||||
context 'when a mode was given' do
|
||||
subject(:mkdir) { Mkdir.new(env, path, 0700) }
|
||||
|
||||
it 'returns the mode' do
|
||||
expect(mkdir.mode).to be 0700
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user