Add Remote::FS class

This commit is contained in:
Thibault Jouan 2013-09-25 00:17:25 +00:00
parent 8531c49e6d
commit d240df0281
3 changed files with 28 additions and 0 deletions

View File

@ -17,6 +17,7 @@ require 'producer/core/recipe'
require 'producer/core/recipe/dsl'
require 'producer/core/remote'
require 'producer/core/remote/environment'
require 'producer/core/remote/fs'
require 'producer/core/task'
require 'producer/core/task/dsl'
require 'producer/core/version'

View File

@ -0,0 +1,13 @@
module Producer
module Core
class Remote
class FS
require 'net/sftp'
def initialize(remote)
@remote = remote
end
end
end
end
end

View File

@ -0,0 +1,14 @@
require 'spec_helper'
module Producer::Core
describe Remote::FS do
let(:remote) { Remote.new('some_host.example') }
subject(:fs) { Remote::FS.new(remote) }
describe '#new' do
it 'assigns the remote given as argument' do
expect(fs.instance_eval { @remote }).to be remote
end
end
end
end