diff options
author | Adam Jacob <adam@hjksolutions.com> | 2008-08-16 23:48:44 -0700 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2008-08-16 23:48:44 -0700 |
commit | 1baf929ee98799747cedc275e511bf445792e77a (patch) | |
tree | e72487c29940a222a740db1c0b2b62b6d4c15747 /spec/unit/resource | |
parent | cbfa29a274c1defe36c218d12b70b70e640f7069 (diff) | |
download | chef-1baf929ee98799747cedc275e511bf445792e77a.tar.gz |
Adding remote_file and remote_directory support
Diffstat (limited to 'spec/unit/resource')
-rw-r--r-- | spec/unit/resource/remote_file_spec.rb | 39 | ||||
-rw-r--r-- | spec/unit/resource/template_spec.rb | 6 |
2 files changed, 42 insertions, 3 deletions
diff --git a/spec/unit/resource/remote_file_spec.rb b/spec/unit/resource/remote_file_spec.rb new file mode 100644 index 0000000000..520eb74a48 --- /dev/null +++ b/spec/unit/resource/remote_file_spec.rb @@ -0,0 +1,39 @@ +# Author:: Adam Jacob (<adam@hjksolutions.com>) +# Copyright:: Copyright (c) 2008 HJK Solutions, LLC +# License:: GNU General Public License version 2 or later +# +# This program and entire repository is free software; you can +# redistribute it and/or modify it under the terms of the GNU +# General Public License as published by the Free Software +# Foundation; either version 2 of the License, or any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper")) + +describe Chef::Resource::RemoteFile do + + before(:each) do + @resource = Chef::Resource::RemoteFile.new("fakey_fakerton") + end + + it "should create a new Chef::Resource::RemoteFile" do + @resource.should be_a_kind_of(Chef::Resource) + @resource.should be_a_kind_of(Chef::Resource::File) + @resource.should be_a_kind_of(Chef::Resource::RemoteFile) + end + + it "should accept a string for the remote file source" do + @resource.source "something" + @resource.source.should eql("something") + end + +end
\ No newline at end of file diff --git a/spec/unit/resource/template_spec.rb b/spec/unit/resource/template_spec.rb index 4bf1f1ace9..3734892dd9 100644 --- a/spec/unit/resource/template_spec.rb +++ b/spec/unit/resource/template_spec.rb @@ -31,9 +31,9 @@ describe Chef::Resource::Template do @resource.should be_a_kind_of(Chef::Resource::Template) end - it "should accept a string for the template name" do - @resource.template "something" - @resource.template.should eql("something") + it "should accept a string for the template source" do + @resource.source "something" + @resource.source.should eql("something") end it "should accept a hash for the variable list" do |