Sha256: 93fd8888e1cc155d17517d30f813382797598e6669d284f8965158cbbabac7ab
Contents?: true
Size: 1.16 KB
Versions: 30
Compression:
Stored size: 1.16 KB
Contents
require File.dirname(__FILE__) + '/../../spec_helper' include PoolParty::Resources describe "Exec" do before(:each) do @exec = exec({:name => "/usr/bin/ifconfig"}) end describe "instances" do it "should turn the one hash instance into a string" do @exec.to_string.should =~ /exec \{ "\/usr\/bin\/ifconfig"/ end it "should turn the two hash instance into a string" do @exec = exec({:name => "/usr/bin/ping 127.0.0.1"}) @exec.to_string.should =~ /"\/usr\/bin\/ping 127\.0\.0\.1":/ end describe "as included" do before(:each) do @exec = exec({:rent => "low", :ensures => "running"}) do name "/www/conf/httpd.conf" end end it "should use default values" do @exec.name.should == "/www/conf/httpd.conf" end it "should keep the default values for the exec" do @exec.path.should =~ /\/usr\/bin:\/bin:\/usr\/local\/bin/ end it "should also set options through a hash" do @exec.rent.should == "low" end it "should ensure running, not the default 'present'" do @exec.ensure.should == "running" end end end end
Version data entries
30 entries across 30 versions & 2 rubygems