diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-05-05 12:21:45 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-05-06 07:16:50 -0700 |
commit | ff8e731efcb4034a2538da7a51d4065afd81db15 (patch) | |
tree | 1c98ad08b4d6db0c23cd7bd8f46acf79f2597e4c /spec/unit/provider/remote_file | |
parent | 59b0b068be892e6df67966757c63c91f1428117a (diff) | |
download | chef-ff8e731efcb4034a2538da7a51d4065afd81db15.tar.gz |
Added NetworkFile to fetcher_spec
Diffstat (limited to 'spec/unit/provider/remote_file')
-rw-r--r-- | spec/unit/provider/remote_file/fetcher_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/unit/provider/remote_file/fetcher_spec.rb b/spec/unit/provider/remote_file/fetcher_spec.rb index c049848fbf..e4d87fa9f0 100644 --- a/spec/unit/provider/remote_file/fetcher_spec.rb +++ b/spec/unit/provider/remote_file/fetcher_spec.rb @@ -24,6 +24,17 @@ describe Chef::Provider::RemoteFile::Fetcher do let(:new_resource) { double("new resource") } let(:fetcher_instance) { double("fetcher") } + describe "when passed a network share" do + let(:source) { "\\\\foohost\\fooshare\\Foo.tar.gz" } + + before do + expect(Chef::Provider::RemoteFile::NetworkFile).to receive(:new).and_return(fetcher_instance) + end + it "returns a network file fetcher" do + expect(described_class.for_resource(source, new_resource, current_resource)).to eq(fetcher_instance) + end + end + describe "when passed an http url" do let(:uri) { double("uri", :scheme => "http" ) } before do @@ -72,4 +83,3 @@ describe Chef::Provider::RemoteFile::Fetcher do end end - |