diff options
author | Adam Jacob <adam@hjksolutions.com> | 2008-07-28 17:57:49 -0700 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2008-07-28 17:57:49 -0700 |
commit | 8d4c3be22c5dbb030e96bcbac12679de7a09b0fe (patch) | |
tree | 6fd5282dccb98e63ce8fae5277e7cadf8acc204a /spec/unit/resource/template_spec.rb | |
parent | d734c714c1e7598ddba40b47c26d10f002e06420 (diff) | |
download | chef-8d4c3be22c5dbb030e96bcbac12679de7a09b0fe.tar.gz |
Updating search tickets
Diffstat (limited to 'spec/unit/resource/template_spec.rb')
-rw-r--r-- | spec/unit/resource/template_spec.rb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/spec/unit/resource/template_spec.rb b/spec/unit/resource/template_spec.rb new file mode 100644 index 0000000000..4bf1f1ace9 --- /dev/null +++ b/spec/unit/resource/template_spec.rb @@ -0,0 +1,44 @@ +# 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::Template do + + before(:each) do + @resource = Chef::Resource::Template.new("fakey_fakerton") + end + + it "should create a new Chef::Resource::Template" 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::Template) + end + + it "should accept a string for the template name" do + @resource.template "something" + @resource.template.should eql("something") + end + + it "should accept a hash for the variable list" do + @resource.variables({ :reluctance => :awkward }) + @resource.variables.should == { :reluctance => :awkward } + end + +end
\ No newline at end of file |