Sha256: 10046608cb0c4e036d0b7323d1f99cac5cec3cdd18674402090582d2c6182ee9
Contents?: true
Size: 937 Bytes
Versions: 4
Compression:
Stored size: 937 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe SousChef::Resource::Base do before do @execute = SousChef::Resource::Base.new(nil, "install bundler") 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::Base.new(@context, "install bundler") @execute.should respond_to(:foobar) end it "delegates missing methods to its context when it responds" do @context = stub(:foobar => 5) @execute = SousChef::Resource::Base.new(@context, "install bundler") @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::Base.new(@context, "install bundler") @execute.should_not be_resource_respond_to(:foobar) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sous_chef-0.0.4 | spec/resource/base_spec.rb |
sous_chef-0.0.3 | spec/resource/base_spec.rb |
sous_chef-0.0.2 | spec/resource/base_spec.rb |
sous_chef-0.0.1 | spec/resource/base_spec.rb |