Sha256: e0ef2bbd13ae7e1160d1bb15d91b8ba5241805d9630806722598606aacb31792

Contents?: true

Size: 608 Bytes

Versions: 7

Compression:

Stored size: 608 Bytes

Contents

require 'spec_helper'
require 'puppet/module_tool'

describe Puppet::ModuleTool::Tar::Solaris 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("gtar 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/solaris_spec.rb
puppet-3.2.3.rc1 spec/unit/module_tool/tar/solaris_spec.rb
puppet-3.2.2 spec/unit/module_tool/tar/solaris_spec.rb
puppet-3.2.1 spec/unit/module_tool/tar/solaris_spec.rb
puppet-3.2.1.rc1 spec/unit/module_tool/tar/solaris_spec.rb
puppet-3.2.0.rc2 spec/unit/module_tool/tar/solaris_spec.rb
puppet-3.2.0.rc1 spec/unit/module_tool/tar/solaris_spec.rb