diff options
Diffstat (limited to 'spec/unit/resource/chef_gem_spec.rb')
-rw-r--r-- | spec/unit/resource/chef_gem_spec.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/spec/unit/resource/chef_gem_spec.rb b/spec/unit/resource/chef_gem_spec.rb index fe788075fd..df37779d1b 100644 --- a/spec/unit/resource/chef_gem_spec.rb +++ b/spec/unit/resource/chef_gem_spec.rb @@ -34,16 +34,12 @@ end describe Chef::Resource::ChefGem, "gem_binary" do let(:resource) { Chef::Resource::ChefGem.new("foo") } - before(:each) do - expect(RbConfig::CONFIG).to receive(:[]).with('bindir').and_return("/opt/chef/embedded/bin") - end - it "should raise an exception when gem_binary is set" do expect { resource.gem_binary("/lol/cats/gem") }.to raise_error(ArgumentError) end it "should set the gem_binary based on computing it from RbConfig" do - expect(resource.gem_binary).to eql("/opt/chef/embedded/bin/gem") + expect(resource.gem_binary).to eql("#{RbConfig::CONFIG['bindir']}/gem") end it "should set the gem_binary based on computing it from RbConfig" do |