Sha256: e5e287d13f842b3badcbe45f1b11e81f10d4be64e6482a7e7da8374580e56acc

Contents?: true

Size: 756 Bytes

Versions: 20

Compression:

Stored size: 756 Bytes

Contents

# encoding: UTF-8
require_relative '../../lib/winrm-fs/core/tmp_zip'

describe WinRM::FS::Core::TmpZip do
  let(:winrm_fs_dir) { File.expand_path('../../lib/winrm-fs', File.dirname(__FILE__)) }

  subject { WinRM::FS::Core::TmpZip.new(winrm_fs_dir) }

  context 'temp file creation' do
    it 'should create a temp file on disk' do
      path = subject.path
      expect(File.exist?(path)).to be true
      subject.unlink
      expect(File.exist?(path)).to be false
    end
  end

  context 'create zip' do
    it 'should add all files in directory to the zip recursively' do
      expect(subject).to contain_zip_entries([
        'exceptions.rb',
        'core/tmp_zip.rb',
        'scripts/checksum.ps1.erb'])
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.0.1/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.0.1/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.0.1/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.0.1/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.0.1/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.0.1/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.0.1/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
winrm-fs-1.0.1 spec/integration/tmp_zip_spec.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
winrm-fs-1.0.0 spec/integration/tmp_zip_spec.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/winrm-fs-0.3.2/spec/integration/tmp_zip_spec.rb
winrm-fs-0.4.3 spec/integration/tmp_zip_spec.rb
winrm-fs-0.3.2 spec/integration/tmp_zip_spec.rb