diff options
| author | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-05-18 15:17:03 -0700 |
|---|---|---|
| committer | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-05-18 15:17:03 -0700 |
| commit | fd6f5b2478efa1864c090545d7ff063b74e0956c (patch) | |
| tree | a30977985e2851213bf2feb4394040c5bdb4ea84 /spec/unit | |
| parent | 4d4d587db224544fe4d4d04351a14ed19039e1d3 (diff) | |
| parent | cbc123c2641f1c51a71710ea5dac5f6114063d34 (diff) | |
| download | puppet-fd6f5b2478efa1864c090545d7ff063b74e0956c.tar.gz puppet-fd6f5b2478efa1864c090545d7ff063b74e0956c.tar.xz puppet-fd6f5b2478efa1864c090545d7ff063b74e0956c.zip | |
Merge branch '2.6.x' into 2.7.next
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/indirector/exec_spec.rb | 8 | ||||
| -rwxr-xr-x | spec/unit/indirector/node/exec_spec.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/indirector/exec_spec.rb b/spec/unit/indirector/exec_spec.rb index 1050ed4cc..87778cdeb 100755 --- a/spec/unit/indirector/exec_spec.rb +++ b/spec/unit/indirector/exec_spec.rb @@ -32,22 +32,22 @@ describe Puppet::Indirector::Exec do end it "should execute the command with the object name as the only argument" do - @searcher.expects(:execute).with(%w{/echo foo}) + @searcher.expects(:execute).with(%w{/echo foo}, :combine => false) @searcher.find(@request) end it "should return the output of the script" do - @searcher.expects(:execute).with(%w{/echo foo}).returns("whatever") + @searcher.expects(:execute).with(%w{/echo foo}, :combine => false).returns("whatever") @searcher.find(@request).should == "whatever" end it "should return nil when the command produces no output" do - @searcher.expects(:execute).with(%w{/echo foo}).returns(nil) + @searcher.expects(:execute).with(%w{/echo foo}, :combine => false).returns(nil) @searcher.find(@request).should be_nil end it "should raise an exception if there's an execution failure" do - @searcher.expects(:execute).with(%w{/echo foo}).raises(Puppet::ExecutionFailure.new("message")) + @searcher.expects(:execute).with(%w{/echo foo}, :combine => false).raises(Puppet::ExecutionFailure.new("message")) lambda {@searcher.find(@request)}.should raise_exception(Puppet::Error, 'Failed to find foo via exec: message') end diff --git a/spec/unit/indirector/node/exec_spec.rb b/spec/unit/indirector/node/exec_spec.rb index f14990cd5..1dbfcd13a 100755 --- a/spec/unit/indirector/node/exec_spec.rb +++ b/spec/unit/indirector/node/exec_spec.rb @@ -31,7 +31,7 @@ describe Puppet::Node::Exec do @result = {} # Use a local variable so the reference is usable in the execute definition. result = @result - @searcher.meta_def(:execute) do |command| + @searcher.meta_def(:execute) do |command, arguments| return YAML.dump(result) end |
