Modify Remote::FS interface:
* Accept SFTP session in FS constructor; * Modify Remote to build the session required by FS; * Change TestEnvHelpers#build_remote in order to provided a test double as the remote FS.
This commit is contained in:
@@ -26,6 +26,9 @@ module TestEnvHelpers
|
||||
end
|
||||
|
||||
def build_remote
|
||||
Producer::Core::Testing::MockRemote.new('some_host.test')
|
||||
fs = RSpec::Mocks::Mock.new('remote fs', __declared_as: 'Double')
|
||||
remote = Producer::Core::Testing::MockRemote.new('some_host.test')
|
||||
remote.define_singleton_method(:fs) { fs }
|
||||
remote
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user