Refactor mkdir action

This commit is contained in:
Thibault Jouan 2014-09-25 20:35:30 +00:00
parent b11d0b6950
commit 429b9f9ad2
2 changed files with 3 additions and 20 deletions

View File

@ -15,6 +15,9 @@ module Producer
end end
end end
private
def path def path
arguments.first arguments.first
end end

View File

@ -23,26 +23,6 @@ module Producer::Core
end end
end 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 end
end end