diff options
Diffstat (limited to 'spec/unit/resource/package_spec.rb')
-rw-r--r-- | spec/unit/resource/package_spec.rb | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/spec/unit/resource/package_spec.rb b/spec/unit/resource/package_spec.rb index 2884c94393..8a1a13394e 100644 --- a/spec/unit/resource/package_spec.rb +++ b/spec/unit/resource/package_spec.rb @@ -64,22 +64,30 @@ describe Chef::Resource::Package do @resource.options.should eql("something") end - describe "when it has a package_name and version" do - before do - @resource.package_name("tomcat") - @resource.version("10.9.8") - @resource.options("-al") - end - - it "describes its state" do - state = @resource.state - state[:version].should == "10.9.8" - state[:options].should == "-al" - end - - it "returns the file path as its identity" do - @resource.identity.should == "tomcat" - end - - end + describe "when it has a package_name and version" do + before do + @resource.package_name("tomcat") + @resource.version("10.9.8") + @resource.options("-al") + end + + it "describes its state" do + state = @resource.state + state[:version].should == "10.9.8" + state[:options].should == "-al" + end + + it "returns the file path as its identity" do + @resource.identity.should == "tomcat" + end + end + + # String, Integer + [ "600", 600 ].each do |val| + it "supports setting a timeout as a #{val.class}" do + @resource.timeout(val) + expect(@resource.timeout).to eql(val) + end + end + end |