Sha256: 2907d29971f6a32694f11ada11d5ca00c2bb03cfb0c7b332d447036ba838fcf5
Contents?: true
Size: 950 Bytes
Versions: 4
Compression:
Stored size: 950 Bytes
Contents
#!/usr/bin/env ruby -S rspec require 'spec_helper' require 'puppet/util/diff' require 'puppet/util/execution' describe Puppet::Util::Diff do describe ".diff" do it "should execute the diff command with arguments" do Puppet[:diff] = 'foo' Puppet[:diff_args] = 'bar' Puppet::Util::Execution.expects(:execute).with(['foo', 'bar', 'a', 'b'], {:failonfail => false}).returns('baz') subject.diff('a', 'b').should == 'baz' end it "should omit diff arguments if none are specified" do Puppet[:diff] = 'foo' Puppet[:diff_args] = '' Puppet::Util::Execution.expects(:execute).with(['foo', 'a', 'b'], {:failonfail => false}).returns('baz') subject.diff('a', 'b').should == 'baz' end it "should return empty string if the diff command is empty" do Puppet[:diff] = '' Puppet::Util::Execution.expects(:execute).never subject.diff('a', 'b').should == '' end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
puppet-3.0.0.rc8 | spec/unit/util/diff_spec.rb |
puppet-3.0.0.rc7 | spec/unit/util/diff_spec.rb |
puppet-3.0.0.rc5 | spec/unit/util/diff_spec.rb |
puppet-3.0.0.rc4 | spec/unit/util/diff_spec.rb |