From 1b3705ca383b64092c9ef54d7e46201fab6271c7 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Mon, 8 Dec 2014 13:44:59 -0800 Subject: Execute and Script Resource improvements - Warning on incorrect usage of the command resource in any script resource - Warning on code in script resource being nil - Specs added to force deprecation of incorrect usage in Chef-13 - Specs added around the (supported) incorrect usage in Chef-12 - Cleanup+Modernization of providers and specs - Fixed some global state bugs around the Chef::Log.level in the spec tests --- spec/unit/resource/script_spec.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'spec/unit/resource/script_spec.rb') diff --git a/spec/unit/resource/script_spec.rb b/spec/unit/resource/script_spec.rb index 9d744baaa5..4affee8e8c 100644 --- a/spec/unit/resource/script_spec.rb +++ b/spec/unit/resource/script_spec.rb @@ -29,18 +29,16 @@ describe Chef::Resource::Script do expect(script_resource.interpreter).to eql("naaaaNaNaNaaNaaNaaNaa") end - describe "when it has interpreter and flags" do + context "when it has interpreter and flags" do before do - script_resource.command("grep") script_resource.interpreter("gcc") script_resource.flags("-al") end - it "returns the command as its identity" do - expect(script_resource.identity).to eq("grep") + it "returns the name as its identity" do + expect(script_resource.identity).to eq(resource_instance_name) end end it_behaves_like "a script resource" end - -- cgit v1.2.1