summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJohn Kerry <jk185160@ncr.com>2016-03-23 21:34:46 -0400
committerJohn Kerry <jk185160@ncr.com>2016-03-23 21:36:47 -0400
commit360d506c9cdf0e94071f0a656eafbc7d2f302d9a (patch)
tree6a8dd80bf6ba0c456245805fb338e524f72fa584 /spec
parent8c8060ed20a6dd0a085a7484ce95a7d4967f407b (diff)
downloadchef-360d506c9cdf0e94071f0a656eafbc7d2f302d9a.tar.gz
Adding base implementation and the start of unit test coverage
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/provider/remote_file/sftp_spec.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/spec/unit/provider/remote_file/sftp_spec.rb b/spec/unit/provider/remote_file/sftp_spec.rb
index 1e42b72af5..2cc473ae6b 100644
--- a/spec/unit/provider/remote_file/sftp_spec.rb
+++ b/spec/unit/provider/remote_file/sftp_spec.rb
@@ -20,7 +20,24 @@ require "spec_helper"
describe Chef::Provider::RemoteFile::SFTP do
#built out dependencies
- let(:uri) { URI.Parse("sftp://opscode.com/seattle.txt") }
+ let(:enclosing_directory) {
+ canonicalize_path(File.expand_path(File.join(CHEF_SPEC_DATA, "templates")))
+ }
+ let(:resource_path) {
+ canonicalize_path(File.expand_path(File.join(enclosing_directory, "seattle.txt")))
+ }
+
+ let(:new_resource) do
+ r = Chef::Resource::RemoteFile.new("remote file ftp backend test (new resource)")
+ r.path(resource_path)
+ r
+ end
+
+ let(:current_resource) do
+ Chef::Resource::RemoteFile.new("remote file ftp backend test (current resource)'")
+ end
+
+ let(:uri) { URI.parse("sftp://opscode.com/seattle.txt") }
describe "on initialization" do