Sha256: fce299db931e9ae8cb60b4a81e4307003e3e453e81e988fd5d1f35f5a0af7bb0

Contents?: true

Size: 603 Bytes

Versions: 7

Compression:

Stored size: 603 Bytes

Contents

require 'spec_helper'
require 'puppet/module_tool'

describe Puppet::ModuleTool::Tar::Gnu do
  let(:sourcefile) { '/the/module.tar.gz' }
  let(:destdir)    { '/the/dest/dir' }
  let(:sourcedir)  { '/the/src/dir' }
  let(:destfile)   { '/the/dest/file.tar.gz' }

  it "unpacks a tar file" do
    Puppet::Util::Execution.expects(:execute).with("tar xzf #{sourcefile} -C #{destdir}")
    subject.unpack(sourcefile, destdir)
  end

  it "packs a tar file" do
    Puppet::Util::Execution.expects(:execute).with("tar cf - #{sourcedir} | gzip -c > #{destfile}")
    subject.pack(sourcedir, destfile)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
puppet-3.2.3 spec/unit/module_tool/tar/gnu_spec.rb
puppet-3.2.3.rc1 spec/unit/module_tool/tar/gnu_spec.rb
puppet-3.2.2 spec/unit/module_tool/tar/gnu_spec.rb
puppet-3.2.1 spec/unit/module_tool/tar/gnu_spec.rb
puppet-3.2.1.rc1 spec/unit/module_tool/tar/gnu_spec.rb
puppet-3.2.0.rc2 spec/unit/module_tool/tar/gnu_spec.rb
puppet-3.2.0.rc1 spec/unit/module_tool/tar/gnu_spec.rb