Sha256: 8476e374ef5bc329fc17830e47300b74b779f180882f64641ebcb6b9766cc9fd
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe SousChef::Resource::Execute do before do @execute = SousChef::Resource::Execute.new(nil, "install bundler") do command "gem install bundler" end end it "has a name" do @execute.name.should == "install bundler" end it "responds to a method its context responds to" do @context = stub(:foobar => 5) @execute = SousChef::Resource::Execute.new(@context, "install bundler") do command "gem install bundler" end @execute.should respond_to(:foobar) end it "delegates missing methods to its context when it responds" do @context = stub(:foobar => 5) @execute = SousChef::Resource::Execute.new(@context, "install bundler") do command "gem install bundler" end @execute.foobar.should == 5 end it "does not resource_respond_to? a method its context responds to" do @context = stub(:foobar => 5) @execute = SousChef::Resource::Execute.new(@context, "install bundler") do command "gem install bundler" end @execute.should_not be_resource_respond_to(:foobar) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sous_chef-0.0.1 | spec/resource/execute_spec.rb |