2424 @resource = Chef ::Resource ::Template . new ( "fakey_fakerton" )
2525 end
2626
27- it "should create a new Chef::Resource::Template" do
28- @resource . should be_a_kind_of ( Chef ::Resource )
29- @resource . should be_a_kind_of ( Chef ::Resource ::File )
30- @resource . should be_a_kind_of ( Chef ::Resource ::Template )
27+ describe "initialize" do
28+ it "should create a new Chef::Resource::Template" do
29+ @resource . should be_a_kind_of ( Chef ::Resource )
30+ @resource . should be_a_kind_of ( Chef ::Resource ::File )
31+ @resource . should be_a_kind_of ( Chef ::Resource ::Template )
32+ end
3133 end
3234
33- it "should accept a string for the template source" do
34- @resource . source "something"
35- @resource . source . should eql ( "something" )
35+ describe "source" do
36+ it "should accept a string for the template source" do
37+ @resource . source "something"
38+ @resource . source . should eql ( "something" )
39+ end
3640 end
3741
38- it "should accept a hash for the variable list" do
39- @resource . variables ( { :reluctance => :awkward } )
40- @resource . variables . should == { :reluctance => :awkward }
42+ describe "variables" do
43+ it "should accept a hash for the variable list" do
44+ @resource . variables ( { :reluctance => :awkward } )
45+ @resource . variables . should == { :reluctance => :awkward }
46+ end
47+ end
48+
49+ describe "cookbook" do
50+ it "should accept a string for the cookbook name" do
51+ @resource . cookbook ( "foo" )
52+ @resource . cookbook . should == "foo"
53+ end
54+
55+ it "should default to nil" do
56+ @resource . cookbook . should == nil
57+ end
4158 end
4259
4360end
0 commit comments