diff options
Diffstat (limited to 'spec/functional/resource/execute_spec.rb')
-rw-r--r-- | spec/functional/resource/execute_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/functional/resource/execute_spec.rb b/spec/functional/resource/execute_spec.rb index c5978da519..3c31537ebe 100644 --- a/spec/functional/resource/execute_spec.rb +++ b/spec/functional/resource/execute_spec.rb @@ -21,11 +21,11 @@ require "functional/resource/base" require "timeout" describe Chef::Resource::Execute do - let(:resource) { + let(:resource) do resource = Chef::Resource::Execute.new("foo_resource", run_context) resource.command("echo hello") resource - } + end describe "when guard is ruby block" do it "guard can still run" do @@ -41,10 +41,10 @@ describe Chef::Resource::Execute do end let(:guard) { "ruby -e 'exit 0'" } - let!(:guard_resource) { + let!(:guard_resource) do interpreter = Chef::GuardInterpreter::ResourceGuardInterpreter.new(resource, guard, nil) interpreter.send(:get_interpreter_resource, resource) - } + end it "executes the guard and not the regular resource" do expect_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:get_interpreter_resource).and_return(guard_resource) |