Sha256: bde092c94ff27d077900a078485cbf873e3c610d3c6c5c2e6d79af0a5b366479
Contents?: true
Size: 862 Bytes
Versions: 17
Compression:
Stored size: 862 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' require 'puppet/util/diff' describe Puppet::Util::Diff do describe ".diff" do it "should execute the diff command with arguments" do Puppet[:diff] = 'foo' Puppet[:diff_args] = 'bar' subject.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] = '' subject.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] = '' subject.expects(:execute).never subject.diff('a', 'b').should == '' end end end
Version data entries
17 entries across 17 versions & 2 rubygems